RAH104
asked on
Moving Large Number Of Files
Hello,
[root@server base_files]# mv *.jpg *.gif *.png *.bmp /home/fp/public_html/image _files/
-bash: /bin/mv: Argument list too long
There are 10,000+ files in that directory it has to search through.
How do I resolve this?
Thanks.
[root@server base_files]# mv *.jpg *.gif *.png *.bmp /home/fp/public_html/image
-bash: /bin/mv: Argument list too long
There are 10,000+ files in that directory it has to search through.
How do I resolve this?
Thanks.
You might have to do below if . isn't in your path.
for i in *.jpg *.gif *png *.bmp;do mv ./${i} /home/fp/public_html/image_files/${i};done
Or use four simple commands:
mv *.jpg /home/fp/public_html/image _files/
mv *.gif /home/fp/public_html/image _files/
mv *.png /home/fp/public_html/image _files/
mv *.bmp /home/fp/public_html/image _files/
mv *.jpg /home/fp/public_html/image
mv *.gif /home/fp/public_html/image
mv *.png /home/fp/public_html/image
mv *.bmp /home/fp/public_html/image
ASKER
[root@server base_files]# for i in *.jpg *.gif *png *.bmp;do mv ${i} /home/fp/public_html/image _files/${i };done
mv: when moving multiple files, last argument must be a directory
Try `mv --help' for more information.
mv: cannot stat `*.bmp': No such file or directory
[root@server base_files]# for i in *.jpg *.gif *png *.bmp;do mv ${i} /home/fp/public_html/image _files/${i };done
mv: when moving multiple files, last argument must be a directory
Try `mv --help' for more information.
mv: when moving multiple files, last argument must be a directory
Try `mv --help' for more information.
mv: when moving multiple files, last argument must be a directory
Try `mv --help' for more information.
mv: cannot stat `*.bmp': No such file or directory
[root@server base_files]# mv *.jpg /home/fp/public_html/image _files/
[root@server base_files]# mv *.gif /home/fp/public_html/image _files/
mv: cannot stat `*.gif': No such file or directory
[root@server base_files]# mv *.png /home/fp/public_html/image _files/
mv: cannot stat `*.png': No such file or directory
[root@server base_files]# mv *.bmp /home/fp/public_html/image _files/
mv: cannot stat `*.bmp': No such file or directory
mv: when moving multiple files, last argument must be a directory
Try `mv --help' for more information.
mv: cannot stat `*.bmp': No such file or directory
[root@server base_files]# for i in *.jpg *.gif *png *.bmp;do mv ${i} /home/fp/public_html/image
mv: when moving multiple files, last argument must be a directory
Try `mv --help' for more information.
mv: when moving multiple files, last argument must be a directory
Try `mv --help' for more information.
mv: when moving multiple files, last argument must be a directory
Try `mv --help' for more information.
mv: cannot stat `*.bmp': No such file or directory
[root@server base_files]# mv *.jpg /home/fp/public_html/image
[root@server base_files]# mv *.gif /home/fp/public_html/image
mv: cannot stat `*.gif': No such file or directory
[root@server base_files]# mv *.png /home/fp/public_html/image
mv: cannot stat `*.png': No such file or directory
[root@server base_files]# mv *.bmp /home/fp/public_html/image
mv: cannot stat `*.bmp': No such file or directory
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window