The page will keep records of Linux commands which i think is helpful. ====== grep ====== - ''grep "example" -i -n /etc/libuser.conf'' - ''cat /etc/libuser.conf | grep "example" -i -n'' the command will find "example" in "/etc/libuser.conf" file and print it with line number - ''grep "imp" /etc/*.conf --color'' - ''grep -i -r --include "*.bash" "domain" ./ --color'' ====== find ====== - ''find /etc -type f -maxdepth 1 -iname "*.conf"'' the command will find *.conf files without child directory in "/etc" directory - ''find /etc -type f -iname "*.conf" -exec grep "example" {} + '' the command will find all "example" in all "*.conf" file in "/etc" directory and print the line ====== crontab ====== - ''crontab -e'' to edit crontab tasks. ====== add user ====== * adduser shaoxp * passwd shaoxp * gpasswd -a shaoxp wheel * or sudo adduser shaoxp sudo above commands will finish add shaoxp as admin user. ====== awk ====== * awk '{print $6 " " $1 " " $9}' ./file * awk '{print $6 " " $1 " " $9}' ./file| sort -n -r | more * cat file | awk -F ' ' '{if($1>10){print $1}}' | wc -l