File system compatible with all OSes?
UDF is a candidate. It works out-of-the-box on linux >= 2.6.31, Windows >= Vista, MacOS >= 9 and on many BSDs.
Note: UDF comes in different versions, which are not equally supported on all platforms, see Wikipedia - Compatibility.
UDF can be created on Linux with the tool mkudffs
from the package udftools
.
Without troubles, use FAT32. There is no other compatible possibility. Linux since version 2.6.xy has no more problems with NTFS, but Mac OS does...Maybe you could make more partitions at your flash, but this is actualy not great solution.
Other solution: Try to imagine you have 4GB flash memory. Split it to 2 partitions. 1) FAT32 with freeware portable applications to access all other FS types. 2) Universal partition, which can be whatever you want - NTFS, ReiserFS (if you want real security and encryption) or whatever. Thanks first partition of your flash memory, you can easily read/write from whatever OS, because of programms you have stored at your FAT32 partition of your flash memory.
Better solution: Forget using a flash drive. Use Dropbox or something through network. They are one of the simplest ways of sharing files between machines.
edit: Thank you for correction: let me write one of comments here: " the maximum size depends on the selected cluster size. The limits really are from 2TB to 16TB for cluster sizes 512B to 4KB for FAT32 (also mentioned on the wikipage)." That is right, excuse my mistake.
Thank you peterph
Since you have cut it to the filesystems supported by OS X and Windows out of the box, I'm afraid the least common denominator is FAT32. exFAT might be an option if you can relax the requirement and accept using FUSE - it is patent encumbered and hence it isn't going to make it to kernel till 2029 or until Microsoft grants the patent on royalty-free basis, whichever happens first.
Update: Microsoft publicly released the exFAT specification in 2019 and exFAT is available as kernel driver in Linux 5.4+. For additional information see wikipedia, MS blog.
On the other hand, remember that lots of informed people would argue that exFAT trades of functionality for simplicity. Thus you will get something that is capable of storing data and works across various OSes, but feature-wise is rather rudimentary.