Laboratory building foundation study notes --- linux command

Start Scheduled Tasks

 

#sudo cron -f & # start the scheduled task 
#crontab -e # edit the current user scheduled task
#sudo crontab -e # root user to edit the scheduled task

 

#cut / etc / passwd -d ': ' -f 1,6 # passwd file and print query the user name and home directory 
#cut / etc each row / passwd -c 2-5 # passwd file to print the first 2- 5 row of content (including the first 5)
#cut / etc / passwd -c -5 # passwd file print lines 1-5 (including 5), the contents of each row
#cut / etc / passwd -c 5- # printing SUMMARY passwd file for each row after row 5 (including the first 5)

 

# Export | grep ". * Yanlou $" # View environment variable ends with "yanlou" content

 

#wc / etc / passwd # passwd file count the number of lines, words, bytes

 

#ls -d / etc / * / | number of directories under wc -l # statistics / etc

 

#cat / etc / passwd | sort -t ':' -k 3 -n # Show the passwd, with ":" separated sort the third column (third column number, so plus -n, default sorted alphabetically )

 

# Repeatedly been said output lines (output only repeating a) and the number of repetitions 
$ History | Cut -c 8 - | Cut -d '' -f 1 | the Sort | uniq -dc
# output of all duplicate rows
$ History | Cut - C . 8 - | Cut -d '' -f . 1 | Sort | the uniq -D

 

Guess you like

Origin www.cnblogs.com/gzhm/p/12172412.html