This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
linux:commands [2018/12/23 20:45] shaoxp created |
linux:commands [2021/06/01 15:29] (current) |
||
|---|---|---|---|
| Line 4: | Line 4: | ||
| - ''cat /etc/libuser.conf | grep "example" -i -n'' | - ''cat /etc/libuser.conf | grep "example" -i -n'' | ||
| the command will find "example" in "/etc/libuser.conf" file and print it with line number | 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'' | ||
| Line 18: | Line 21: | ||
| - ''crontab -e'' | - ''crontab -e'' | ||
| to edit crontab tasks. | 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 | ||
| + | |||