[리눅스 대량 파일 삭제 이동시]
find /disk1/data/aaa/bbb/ -type f -name '*' -exec mv {} /disk1/data/aaa/. \;
[user]$ mv * ../directory2 bash: /bin/mv: Argument list too long
(Example 1)
[user]$ mv [a-l]* ../directory2 [user]$ mv [m-z]* ../directory2
(Example 2)
[user@localhost directory]$ find $directory -type f -name '*' -exec mv {} $directory2/. \;
(Example 3a) function large_mv () { while read line1; do mv directory/$line1 ../directory2 done } ls -1 directory/ | large_mv
(Example 3b)
function larger_mv () { while read line1; do md5sum directory/$line1 >> ~/md5sums ls -l directory/$line1 >> ~/backup_list mv directory/$line1 ../directory2 done } ls -1 directory/ | larger_mv
|