标签:汇总 gre -name $nf tmp inux pre comm $1
**四剑客常用命令汇总**
1.find
find path -option [ -print ] [ -exec -ok command ] {} (find 查找路径 -type f/d -name ..... -size 1k/M -mtime/atime/ctime +-9 文件)
find -type/-perm/-empty/
find /tmp -type f -name "*.tmp" -exec rm -rf ‘{}‘ \;
find / -type f -name test.txt -size 10k -mtime
find . -type f -name .....
-exec rm -rf {} \;或者|xargs rm -rf {}
2.grep
grep -v
grep -c
grep
grep -e = egrep
egrep --color "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}"
3.sed
sed -i
4.awk
awk -F:
awk -f
awk -v
awk -F: ‘{print $1":"$NF}‘ :""表示添加的内容
ifconfig | grep "inet addr:"|grep -v "127.0.0.1"|awk ‘{print $2}‘|awk
标签:汇总 gre -name $nf tmp inux pre comm $1
原文地址:https://blog.51cto.com/12464725/2473121