How to check that all paths/files on a volume conform to EXT3, FAT32, and HFS+

ext3fat32filesystemshfs+ntfs

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?

Best Answer

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.