【发布时间】:2013-06-27 20:57:38
【问题描述】:
假设我输入这个命令:
find /etc/info/ -name ".c" | xargs -I {} grep -l 'importantFile' {}
现在我有了所有我感兴趣的文件,这些文件的后缀为 .c 和关键字“importantFile”。如何将其移动到我的当前目录之一(名称:文件夹)?
我试过了:
find /etc/info/ -name ".c" | xargs -I {} grep -l 'importantFile' {} mv{} ./folder
它不起作用。请帮忙:p
【问题讨论】:
-
-name选项需要一个通配符,例如:find /etc/info/ -name "*.c"