File systems and their types
Files on storage media (hard drives, flash drives, optical media, etc.) are organized, stored and named according to a certain order, which is called the file system. Different media have different types of file systems. What of them can face an ordinary user?
The file system organizes files to make it easier for the operating system to work with them: the file system drivers supply the OS with information about file names, their size, attributes, and locations. The file system determines the maximum possible length of the file name, its maximum size and other parameters.
There are different types of file systems for different media. By the way, the media does not have to be physical: there are, for example, virtual and network file systems. What are the types of file systems, depending on their purpose, that is, the carrier?
First of all, the user is faced with file systems intended for random access media. These media include, for example, hard drives. If you are using a Windows operating system, then most likely you are dealing with the NTFS file system. Older versions of the operating system used the FAT32 file system, which is still used on flash drives.
Many Linux distributions of Linux-based operating systems usually use ext as the default file system (Extended File System). There are several versions of this file system – ext2, ext3, ext4. In the latest versions of Linux-based distributions (including Google Android), the file system is ext4.
Optical media, CDs and DVDs, also have their file systems. The ISO 9660 standard is considered universal, such disks are read by computers with any operating system – Windows, Mac OS X, Unix. There is also a file system format UDF, which is more suitable for large discs (DVD, Blu-ray). There are other file systems for optical discs, less common.
We encounter hard disks, flash drives and optical disks more often than other carriers, which is why their file systems interest us most. But still it is worth knowing what other types of file systems are:
virtual file systems;
network file systems;
file systems for media with sequential access (these include, say, magnetic tapes);
file systems for flash memory;
specialized file systems.
Let’s talk a little more about the types of file systems designed for random access media, for example, hard drives and flash drives. The type of the specific file system affects the parameters of the files, for example, the size of the file name. In the FAT32 system, the maximum file name length is 255 characters. In NTFS, according to the specification, 32,768 characters, but some operating systems impose a limitation, therefore in reality the same 255 Unicode characters will be the maximum length. In ext2 / ext3, the name length is limited to 255 bytes.
Also, possible file attributes depend on the file system. For example, FAT32 and NTFS systems allow you to assign “read only”, “system”, “hidden”, and “archived” attributes to files. And the ext2 system offers attributes such as “setting a user ID”, “setting a group ID” and the so-called “sticky bit”.
There are differences between the FAT32 and NTFS file systems. Both of these file systems are used by Windows, NTFS has replaced FAT32 and is used in recent versions of the OS. In the FAT32 system, the disk size is limited to about 8 terabytes, in NTFS it can be 264 bytes. The maximum file size in FAT32 is 4 GB, in NTFS it is 264 bytes minus 1 kilobyte (theoretically), and in fact it is 244 bytes minus 64 kilobytes. Also in NTFS, the maximum number of files is larger, there are some other differences.
But at the same time, the FAT32 system is still used on USB flash drives (flash drives), because it provides a higher speed of writing, reading and copying data. Therefore, most often flash drives are formatted in FAT32, and not in NTFS. Formatting a USB flash drive to NTFS only makes sense if you need to write a file larger than 4 GB to it.
Now you know what the main types of file systems are and in what cases you may encounter this or that file system.