什么样将find命令所找到的文件mv 其他目录..
find /xxx/ -type f -name "x.x"|xargs mv -f /xxx/xxx {}\;好不行..高手指教.. :o mv -f $(find /xxx/ -type f -name "x.x") target_dir find /xxx/ -type f -name "x.x" -exec mv -f {}\;
当使用诸如m v或r m命令时,可以使用- e x e c选项的安全模式 多谢版主热心帮助. 再给点信息:
f i n d命令是一个非常优秀的工具,它可以按照用户指定的准则来匹配文件。使用e x e c和 x a rg s可以使用户对所匹配到的文件执行几乎所有的命令。
:-D target_dir 是不是支定目录??还是不行..出错..(-bash: syntax error near unexpected token `/home/yangqi/ find /home/yangqi/junking -type f -name "*.txt" |xargs mv -f指定目录..不知哪里出错...
mv -f $(find /home/yangqi/junking -type f -name "x.x")/home/kenny
也出现 mv:missing file argument
我用的是mandrake linux... find /xxx/ -type f -name "x.x" -exec mv -f {}\;
这个?!
页:
[1]