Problem copying files to USB drive

I am using Suse Linux 10.3 and I am having a problem copy files to my USB drive. When I attempt to copy some mp3 files to my USB drive I get an error which says that the drive is full.

The USB drive is a 512MB drive. When I look at the device using sysinfo:, it says that the drive size is 483.2 MB with 414.1 MB available.

I am using the following command to copy the files once I change into the directory which has the mp3 files I want to copy:

ls *.mp3 | cat | xargs -i cp {} /media/USB20FD/.

The reason for using the above command is that I am using this USB drive in a boom box to listen to audio books. If I just copy the files to the USB drive they get copied in random order and thus make listening to the audio book annoying. This command will copy the files in the correct order. I have used this command with another 4GB USB drive without issue.

I have attempted to reformat the USB drive but I will still get an error after approximately 50MB of files are copied.

The error takes the form of the following message:
cp: cannot create regular file '/media/USB20FD/./<name of file>: No space left on device.

Does anybody have any idea why this is happening and how to resolve this problem?

Thank you very much.

I’m getting similar behavior while copying img files. There is plenty of space left on the thumb drive but I’m getting the error that there isn’t.

Any help? I have tried three different (known-to-be-good) thumb drives.

Additional information… I’m using OpenSuse 11.1. I tried via the command line initially and then tried using Nautilus or whatever it is that is packaged in Gnome as the GUI way of moving files. I thought maybe it could have been a bad file so I used some random other group of files off the hard drive totalling about 800mb. The drives always contained 1 GB of storage or more.

Short copies always succeed. It’s the large groups that fail even when there’s space.

> Any help? I have tried three different (known-to-be-good) thumb
> drives.

known to be good to Linux? or some off-brand OS? :wink:

how many partitions on that drive?

and if more than one, are you trying to copy to one with no space?


Quite honestly I’ve never known any storage media that has worked on one OS to not work on another, so yes, these are known to be working thumb drives.

They have one single FAT partition so that they’re interchangeable between any OS (basically). They are not out of space.

Stab in the dark - wrap the copy in a for loop and insert a sleep() on each pass - maybe something in the USB stick is choking?

I do copy a large number of files to USB sticks in one go and never faced with anything like this. (Un)fortunately, I am having ext2 filesystem instead of vfat on them.

Let’s pretend for a moment that I don’t know anything about bash scripting… because I don’t. What would be a rough bash script for such a thing as this?

(I’m not in the mood to code this out in some other language. For now it’s easier just to copy the files to the thumb drives from Windows/Mac and deal with this problem later.)