A filesystem is the way the files are stored in a hard disk.
Let's imagine a clean hard disk as an empty room that you are going to use to store things.
There are thousands of ways to organize those things in the room to make it easy to find any of those things when you need it.
FAT, EXT4, NTFS, etc. are simply ways to organize the files in the hard disk. The main points are:
- Quick find any file
- Easy deletion of files.
- Recovery of errors in read or write proccess.
Apple OS X uses HFS+ and Microsoft uses NTFS.
They are simply different ways to put the same information on the disk.
The contents of the file are NEVER modified.
As NTFS and HFS+ are propietary filesystems, each vendor is not interested in compatibility with the other one.
FAT32 has become the de facto filesystem for portable systems (USB drives for example), so Linux and Apple have been forced to include drivers for FAT32 to be compatible with the USB devices in the market.
However Microsoft is the owner of a series of patents for key parts of the FAT file system.
Microsoft offers licenses for use of its FAT specification and "associated intellectual property", at the cost of a US$0.25 royalty per unit sold.
When you send an attachment in an email, you are simply reading from the filesystem and putting the file (remember, that the content never is modified) inside the message, and when other one receive the email with the attachment, he is simply putting it in his hard disk.
3I'm not sure I follow what the question is. The file is what contains the data. Anything that knows how to open its filetype can use it. The file and its contents don't change in different environments. If you want to save the file on a storage device, the filesystem used on that device determines how information about the file is stored (directory information, attributes, permissions, etc.). Just as there are different filetypes, there are different filesystems available for use with storage devices. The developers of different OSes have chosen what filesystems will be natively supported. – fixer1234 – 2017-02-17T07:49:58.197
@fixer1234 why do you need to format a USB memory stick to FAT32 when transferring files between Mac and Windows? – Celeritas – 2017-02-17T07:56:40.560
2
If you use some other means to transfer a file you usually end up with some intermediate, standardized format. If you look at E-Mail a File Attachment gets translated into a base64 string as E-Mail is a clear text format it's entirely human readable (but not necessarily understandable). The actual problem also exist if you use a network to transfer files (little vs. big endian) but at some point they decided on to always use big endian.
– Seth – 2017-02-17T07:58:19.710You don't need to. It's just that Mac OS and Windows support FAT32 as a possible file system "out of the box". – Seth – 2017-02-17T07:58:59.590
Seth beat me to it. There are other formats that both can use, especially if you add drivers to the OS. – fixer1234 – 2017-02-17T08:00:26.550
That was my question. Where, on a network, does the translation happen? For example if I use Outlook to email a jpeg from my Windows computer to Mac, how come that works? Does the OS receive the data on the network interface in a raw format and then decides how to store it? Is there some sort of translation going on the converts from NTFS to HFS? – Celeritas – 2017-02-17T08:08:41.357
Basically I'm asking why do you need to format to FAT32 for USB stick but not worry if it's done over the network? – Celeritas – 2017-02-17T08:10:43.720
3There is an implied filesystem conversion, but it is not done with the agreement of the email clients. The email client reads data on an NTFS system and gets a block of data that is a JPEG image. It sends it out in a simple common wrapper and says "here is some data, do with it as you wish". It has no filesystem information whatsoever at that point, it is literally just a data block that happens to contain a JPEG image. The receiving email client sees a block of data, decodes it and finds a JPEG image, then you save it locally on your own system in whatever filesystem that computer has. – Mokubai – 2017-02-17T08:13:42.690
2There's no translation at all. The file, itself, doesn't change regardless of how it's sent or stored or transferred (ignoring temporary handling in transit). When you do store it, the file isn't changed. The filesystem defines how things about the file are stored (how to find it on the device and metadata associated with the file). Each OS has certain filesystems it knows how to read natively, and additional ones you can teach it to use with drivers. That's just about finding it on the device and getting it on and off. You just need a filesystem both OSes know how to use. – fixer1234 – 2017-02-17T08:19:21.733
This is a little akin to computers with different connectors. If you want to share a device between them, you need one that is compatible with the connectors on both computers (or use an adapter). That doesn't affect the content that's shared, and there's no translation of the content. – fixer1234 – 2017-02-17T08:47:55.463
@Mokubai thanks that makes sense. So when a file is intransant accross a network, it doesn't really have a filesystem as a stream of bytes is just a stream of bytes? But USB sticks are different as that is persistent storage so they must have a file system to define how the data is stored. Do I understand correctly? – Celeritas – 2017-02-17T09:13:37.200
I am not an expert but somehow follow that discussion: I agree with the facts that emails, and USB are different translation level that the elementary codes are taking care of. However I also believe that there is something to do with the data transfert speed: transfert data by email = FAT32->"big endian?"(thanks to Seth)->FAT32 you need two translators take quite some time. I think if USB require same format is to copy direct FAT32->FAT32 no translator are required, and therefore at best speed... – Jonathan – 2017-02-17T09:27:00.487