Tiny Core Linux
Off-Topic => Off-Topic - Tiny Core Lounge => Topic started by: Juanito on February 04, 2011, 08:35:27 AM
-
I'm faced with trying to copy about a 1000 jpg files from 10,000 of other files from a windows hd.
Of course the windows folders have spaces in the folder names, but why will this work: sudo cp --parents "/mnt/nfs/backup/DOCUMENTS/dumb windows folder name/dumb file name.jpg" /mnt/public-wd/temp
and this will not work: for F in `cat files`; do sudo cp --parents "$F" /mnt/public-wd/temp; done
..where files contains a list of the 1000 jpg files enclosed in "", eg "/mnt/nfs/backup/DOCUMENTS/dumb windows folder name/dumb file name.jpg"
..any pointers would be much appreciated
-
Maybe you are looking for :
export IFS=
-
I think it is because
for F in `cat files` ....
breaks on spaces as well as on line breaks. Try something like this
cat files |while read F ; do {
...
} done
-
thanks - I got the job done with tar