今天使用find命令查找删除文件时,遇到下面错误,这个是因为在{}和\之间必须要有空格,否则会报上面的错。 以前都没有注意到这个细节,特此记录一下。

 

[root@DB-Server full]#  find  . -maxdepth 1 -type d  -mtime +3 -exec rm -rf {}\;
find: missing argument to `-exec'
[root@DB-Server full]#  find  . -maxdepth 1 -type d  -mtime +3 -exec rm -rf {} \;
[root@DB-Server full]#

 

find: missing argument to `-exec'

 

相关文章:

  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2021-08-18
  • 2021-09-17
  • 2022-12-23
  • 2021-09-24
猜你喜欢
  • 2022-01-17
  • 2021-10-01
  • 2022-12-23
  • 2022-12-23
  • 2021-04-28
相关资源
相似解决方案