移动大量文件 [英] Moving large number of files
本文介绍了移动大量文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我运行命令 MV文件夹2 /*.*文件夹
,我碰到一个参数列表太长的错误。
我觉得 LS的一些实例
和 RM
,处理此错误,使用找到文件夹2 -name*。*
。但我把它们应用到 MV
。
解决方案
找到文件夹2 -name*。*-exec MV {}文件夹\\;
-exec
运行的任何命令, {}
插入发现文件名, \\;
标志着exec命令的结束。
If I run the command mv folder2/*.* folder
, I get "argument list too long" error.
I find some example of ls
and rm
, dealing with this error, using find folder2 -name "*.*"
. But I have trouble applying them to mv
.
解决方案
find folder2 -name '*.*' -exec mv {} folder \;
-exec
runs any command, {}
inserts the filename found, \;
marks the end of the exec command.
这篇关于移动大量文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文