Linux 删除大量的文件和移动大量的文件(Argument list too long)
来源:互联网 发布:sql 不包含指定条件值 编辑:程序博客网 时间:2024/04/30 12:53
1.
find ./ -name '*' | xargs -i mv {} ../test/
find ./ -name '*' | xargs rm -rf
2.Question :
[user@localhost directory]$ mv * ../directory2
bash: /bin/mv: Argument list too long
#Method1 : when file name can be distributed across the alphabet.
[user@localhost directory]$ mv [a-l]* ../directory2
[user@localhost directory]$ mv [m-z]* ../directory2
#Method2: using find and exec commands
[user@localhost directory]$ find $directory -type f -name '*' -exec mv {} $directory2/. /;
find $directory -type f -name '*' -exec scp {} username@servername:/$path/. /;
#Method3: using function
function large_mv ()
{ while read line1; do
mv directory/$line1 ../directory2
done
}
ls -1 directory/ | large_mv
- Linux 删除大量的文件和移动大量的文件(Argument list too long)
- Linux 删除大量的文件和移动大量的文件(Argument list too long)
- 解决删除大量文件的问题 -bash: /usr/bin/sudo: Argument list too long
- LINUX中删除大量文件时报 -BASH: /BIN/RM: ARGUMENT LIST TOO LONG 错误
- Linux下删除大量文件error : bash: /bin/rm: Argument list too long
- linux 删除大量的文件和移动大量的文件
- linux 删除大批量文件 /bin/rm: Argument list too long
- Linux下删除数量比较多的文件报错:-bash: /bin/rm: Argument list too long
- linux argument list too long的解决办法
- linux下删除大量文件的方法
- linux下删除大量文件的方法
- Linux 删除大量文件
- linux删除大量文件
- Linux下出现 “Argument list too long”错误的解决
- linux Argument list too long 参数列表过长的办法
- linux大量文件的复制
- Argument list too long的解决方法
- Argument list too long的解决方法
- WINCE 网卡控制
- 将格林威治时间转换为本地时间
- VNC: Couldn't start Xvnc; trying default font path.
- KVM移植到ARM-Linux步骤
- MySQL字符集的设置
- Linux 删除大量的文件和移动大量的文件(Argument list too long)
- 使用jdbc来保存log4j日志信息的一个例子
- 面试常见问题1: 字符串分割
- howToTomcatWorks 学习 (一)
- Microsoft and MSP Certification
- JSP中的EL表达式详细介绍(转)
- 关于JSP中的offsetparent
- 大家都来支持我一下吧
- VC程序调试初步