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

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

相关文章:

  • 2021-11-30
  • 2021-04-22
  • 2021-06-23
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2021-10-01
  • 2021-10-30
猜你喜欢
  • 2021-07-15
  • 2021-09-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
相关资源
相似解决方案