Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I’ve run rsync (3.0.6) on Mac OS X 10.6 (Snow Leopard )to backup a folder form an external hard drive (FAT32) to another external hard disk (FAT32). Somehow certain files (and at times they change!) get copied with a different file name. For example:

campo_2006_valcanale_127.jpg --> CAMPO~40.JPG

Shrunk and upper-cased, of course rsync next time deletes the CAMPO~40.JPG and copies it again, but almost always it gets messed up again. At times it works, but also files that were OK get corrupted.

Now, if I go in the destination directory and do a ls -a I can’t see the file campo_2006_valcanale_127.jpg because it has been somehow renamed but the file campo_2006_valcanale_127.jpg actually exists! I can display it, I can write on it etc…, simply it’s invisible! Maybe it’s just the filename that's behaving oddly…

I get the same behavior when I copy files manually (using cp) and even when I copy them with the “Finder!” I drag and drop a file and its name changes!

If you have any hint, please tell me… I can provide more info if need be.

share|improve this question
up vote 1 down vote accepted

The shortened filenames are artifact of FAT32; any file with a name longer than the old 8.3 limits gets given a shortened name, as you've seen. Use a proper filesystem, one that handles long filenames natively instead of using a bizarre hack, and you won't have this problem (eg, NTFS, HFS, ext - all handle long filenames natively). Wikipedia has more detail on the Long Filename hack that FAT32 uses

FAT32 also has other issues that make it hard for rsync to work - eg, it doesn't store timestamps with any great precision, so rsync can't use its normal heuristics.

The rsync FAQ has an entry on rsync copying the same files many times. In short, it's probably the timestamp that's causing most of the re-syncing; modify-window=1 or maybe modify-window=2 should fix this.

share|improve this answer
yes I know this, but the odd thing is that at times it happens, while at other times it doesn't.. My problem is that I'm in a mac/windows environment.. and this hdd must be accessed by both macs an computers.. – luca Jan 6 '10 at 22:46
Which sucks, because there's no good filesystem that all Mac, Windows and Linux can all access easily except fat32, so we're all stuck with this mess sigh – James Polley Jan 6 '10 at 22:48
OSX & Linux can use NTFS-3g to read/write NTFS, so there's no more need for FAT32 -- toss it!! – quack quixote Jan 7 '10 at 0:40
Not out-of-the-box; although most distros of linux should include FUSE and ntfs-3g by now. – James Polley Jan 7 '10 at 1:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .