grep/find用到的常用的例子

来源:互联网 发布:拉塞尔夏季联赛数据 编辑:程序博客网 时间:2024/05/19 01:11
find * ! -user cool
find * ! -user cool |egrep -v coolkb
find * ! -group cool |egrep -v coolkb
BAD_DIRS=$(find * -type d \( -perm -020 -o -perm -002 \))\

find . -type d -name view


grep -rn SO_SNDBUF *
NON_USER_COOL_LIST=$(print - $NON_USER_COOL_LIST | tr ' ' '\n' | egrep -v "^loads")----tr is shell replace 
0 0