小编t.f*_*kas的帖子

使用 -exec 和 -mtime 运行“find”命令时参数无效

Centos 上出现了相当奇怪的错误消息。

我尝试运行这个命令:

find /tmp/something -type f -mtime +2h -exec cp '{}' /tmp/target \;
Run Code Online (Sandbox Code Playgroud)

我得到的错误是:

find: invalid argument `-exec' to `-mtime'
Run Code Online (Sandbox Code Playgroud)

其他发行版上的“查找”会有所不同吗?

find exec mtime

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

exec ×1

find ×1

mtime ×1