
1 11138 2014-10-20 19:27:23 +08:00 一次mv的文件太多了吧,可以试一下减少数量或考虑用find来代替。 |
2 randal 2014-10-20 19:28:30 +08:00 find /mnt/sda/t1 -type f -name "*.mp4" |head -n 100|xargs -I {} mv {} /mnt/sda1/t2 |
3 andybest OP @randal 我的 xargs 没有 -I 参数,有什么可以替代的吗? root@OpenWrt:~# xargs --help BusyBox v1.22.1 (2014-08-04 22:39:32 CEST) multi-call binary. Usage: xargs [OPTIONS] [PROG ARGS] Run PROG on every item given by stdin -p Ask user whether to run each command -r Don't run command if input is empty -0 Input is separated by NUL characters -t Print the command on stderr before execution -e[STR] STR stops input processing -n N Pass no more than N args to PROG -s N Pass command line of no more than N bytes -x Exit if size is exceeded |
4 randal 2014-10-20 20:32:05 +08:00 @andytest 应该可以换成 |while read line;do mv "$line" /mnt/sda1/t2/;done |
7 msg7086 2014-10-20 21:10:42 +08:00 via iPhone rsync应该内置通配符解析吧,这样就不用在命令行上展开了 |