3

I have a volume with files on it that will need to be copied between Mac, Linux, and Windows machines. I want to ensure that there are no surprises with:

  • file size
  • filename length
  • filename character set
  • number of nested directories

Am I correct to assume that anything (in the above list) that is legal in FAT32 will be also be legal in NTFS, EXT3, and HFS+?

If not, is there a script/utility I can run, without actually copying the files to all of these types of volumes, that will print a list potential problems?

2 Answers 2

5

You are correct - FAT32 and it's limitations (to do with file size and character limits) will be your biggest constraint.

For reference (so as to have the information all in one place):

| TYPE  | FILE SIZE | FILENAME | CHARACTER SET  | DIRECTORY | VOLUME SIZE |
| FAT32 | ~4GB      | 11/255(2)|ASCII/Unicode(2)| No (3)    | 2TB (1)     |
| NTFS  | ~16 EiB(5)| 255      | Unicode(6)     | No (4)    | 16 EiB      |
| EXT3  | 16GB/2TB  | 255      | Unicode        | No        | 16GB/32TB(7)|
| HFS+  | ~8 EiB    | 255      | Unicode        | Unlimited | ~8 EiB      |
| ZFS   | 16 EiB    | 255      | Unicode        | Unlimited | 16 EiB      | 
  1. It's possible to go as high as 8TB with 64k size clusters.
  2. FAT32 on it's own supports 11 character file names (8.3) using ASCII, with Long File Name support it's upped to 255 UTF-16 characters. Excluded ASCII Characters are: " * / : < > ? \\ |
  3. While there is no limit on the number of subdirectories - you have a path limit of 260 characters. (This was the limit in Windows 95/98 - it's 4096 on Linux)
  4. Like FAT32 there is no limit on subdirectories but you have a path limit of 32767.
  5. EiB = exbibyte = 2 ^ 60 byte. 1 exbibyte = 1024 petabytes. 1 petabyte = 1024 terabytes.
  6. NTFS has the same set of characters not allowed as FAT 32 (" * / : < > ? \\ |)
  7. The max limits depend on the block size.

For more info a good starting block is Wikipedia's Comparison of File Systems but is quite vague on some details.

5
  • damn you're good, chealion. great chart
    – username
    May 23, 2009 at 17:09
  • UTF-16 is not a character set, it is an encoding. unicode is the corresponding character set.
    – user1686
    May 25, 2009 at 12:53
  • Oops. Thanks for that. Ended up recording the encodings forgetting only wanted the chaacter sets.
    – Chealion
    May 25, 2009 at 15:08
  • according to MSDN, FAT doesn't use Unicode msdn.microsoft.com/en-us/library/windows/desktop/…
    – Fowl
    Apr 4, 2012 at 22:56
  • @Fowl: Long File Name supports 255 UTF-16 characters. Can't seem to find an MSDN document about it and FAT specifically. en.wikipedia.org/wiki/FAT32#Long_file_names
    – Chealion
    Apr 4, 2012 at 23:15
0

I don't know of any such utility, but what comes to mind is that you could have a set of virtual machines in which you can test most of those file systems using a script.

Just use a script to copy over a set of example files to each partition and see if it throws an error.

You must log in to answer this question.

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