Hi, I'm trying to write a script to search through my computer and
find all .jpg files and put them all in a directory. So far I have
this:
for i in `find /home -name '*.jpg' ` ; do mv $i home/allen/Pictures/PicturesFound ; done
When I run it, I get this error (this is only part of it, it goes on
for a while)
mv: cannot stat `-': No such file or directory
mv: cannot stat `A': No such file or directory
mv: cannot stat `Decade': No such file or directory
mv: cannot stat `of': No such file or directory
mv: cannot stat `Hits': No such file or directory
mv: cannot stat `(1969-1979)/front.jpg': No such file or directory
mv: cannot stat `/home/allen/.local/share/Trash/files/2011/03/19/00.':
No such file or directory
mv: cannot stat `Protest': No such file or directory
mv: cannot stat `The': No such file or directory
mv: cannot stat `Hero': No such file or directory
mv: cannot stat `-': No such file or directory
mv: cannot stat `Scurrilous': No such file or directory
mv: cannot stat `2011': No such file or directory
Any Ideas what's wrong? I'm new to BASH, obviously. Please don't
criticize me, and try not to change my whole code, as I know there are
probably way better ways to get what I want accomplished, I just want
to get this to work. Thanks very much! hope to get a reply.