Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to copy several gigs of jpgs to another hard drive. It gets to about 2.5 gigs then says there is no space left, when there is. I have tried this on a 70GB NTFS partition, and a 120GB FAT32 partition. They are all being copied to a JPEG folder, so its not an issue of too many things in the root directory of a FAT partition...though that should never happen in NTFS. I can touch a file on it, write to it, I just can't copy any more JPEGs.
Putting it in another directory works. There must be a cap on the number if files I can put into a folder. I knew there was in FAT32, but I didn't think it existed in NTFS. The trick is now to copy the images that have not already been copied to /mnt/temp/jpg to /mnt/temp/jpg2, but there are so many images, thousands...
I know I could use cp -u to only copy the images that haven't been copied, but how can I do it to a different directory. I used foremost to recover images from a hard drive, so all of the file names are <sector number>.jpg, so it is no small task to just copy the remaining files.
for i in `ls /source`; do
if [ ! -e /dest/$i ]; then
cp $i /dest/new
fi
done
It may be much slower than a cp * dest, but it would work. There are alternatives, creating file lists and using xargs, but that would be a few more lines.
Forgot to mention that /dest/new is a previously created directory. If a new directory is not created then all the files will be copied to a new file called new.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.