Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer
    
damn you're good, chealion. great chart –  username May 23 '09 at 17:09
    
UTF-16 is not a character set, it is an encoding. unicode is the corresponding character set. –  hop May 25 '09 at 12:53
    
Oops. Thanks for that. Ended up recording the encodings forgetting only wanted the chaacter sets. –  Chealion May 25 '09 at 15:08
    
according to MSDN, FAT doesn't use Unicode msdn.microsoft.com/en-us/library/windows/desktop/… –  Fowl Apr 4 '12 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 '12 at 23:15

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.