【发布时间】:2015-03-20 08:37:15
【问题描述】:
我正在尝试使用以下 find 命令删除文件,很少有文件没有删除,所有这些文件名都像:filname.123.log。
我不能重命名或不能对文件名做任何事情只需要删除 命令
$ find /BASE/CODE/LOGS_BACK -type f -mtime +60 | xargs rm -f
xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option
我用谷歌搜索并尝试使用以下命令,但它给出了不同的错误。
$ find /BASE/CODE/LOGS_BACK -type f -mtime +60 | xargs -0 rm -f
xargs: argument line too long
你能帮忙解决这个问题吗?
【问题讨论】: