find ./ -type d ! -name "."

列出本目录中的文件不是.的目录

find ./  -maxdepth 1 -type d ! -name "."

只展示本目录下的非.的一层目录

find ./  -type d ! -name "." -prune

find ./  -type d  -o -type  f    其中-o是或的意思

find ./  -type d  -or -type  f    -or或的意思

find ./  -type d  -and -type  f    -and且者的意思

find ./  -type d  -or -type  f    -or或者的意思

find ./  -type f -name  "*.txt" -mtime +7 | xargs rm -f    删除7天以前的文本文件

find ./  -type f -name  "*.txt" -mtime +7  -exec rm -f  {} /;

find ./  -type f -name  "*.txt" -mtime +7 delete

posted @ 2019-03-08 20:49  todayORtomorrow  阅读(1656)  评论(0)    收藏  举报