Main Page | See live article | Alphabetical index

File system

In computing, a file system is, informally, the mechanism by which computer files are stored and organized on a storage device, such as a hard drive. More formally, a file system is a set of abstract data types that are necessary for the storage, hierarchical organization, manipulation, navigation, access and retrieval of data.

Most operating systems provide a file system. File systems are represented either textually or graphically by file browsers or shells. If graphically, the metaphor of folders containing documents, other files, and nested folders is often used. (See directory and folder for more on this.) A file system is an integral part of any modern operating system. Early microcomputer operating systems' only real task was file management - a fact reflected in their names.

The most familiar file systems make use of an underlying data storage device that offers access to an array of fixed-size blocks, sometimes called sectors, generally 512 bytes each. The file system software is responsible for organizing these sectors into file and directories, and keeping track of which sectors belong to which file and which are not being used. But file systems need not make use of a storage device at all. A file system can be used to organize and represent access to any data, whether it be stored or dynamically generated (eg, from a network connection).

File systems typically have directories which associate file names with files, usually by connecting the file name to an index into a file allocation table of some sort, such as the FAT in an MS-DOS file system, or an inode in a UNIX-like filesystem. Directory structures may be flat, or allow hierarchies where directories may contain subdirectories. In some file systems, file names are structured, with special syntax for file name extensions and version numbers. In others, file names are simple strings, and per-file metadata is stored elsewhere.

Traditional filesystems offer facilities to create, move and delete both files and directories. They lack facilities to create additional links to a directory (hard links in Unix), rename parent links (".." in Unix-like OS), and create bidirectional links to files.

Linux assigns a device name to each device, but this is not how the files on that device are accessed. There are no drive letters in Linux. Instead, Linux creates a Virtual File System for us, which makes all the files on all the devices appear to exist on one global device. In Linux, there is one root directory, and every file you have access to is located under it somewhere. Furthermore, the Linux root directory does not have to be in any particular place. It might not be on your first hard drive. It might not even be on your computer. Linux can use a network shared resource as its root directory.

To gain access to files on another device, in Linux you must first tell it where in the directory tree you would like those files to appear. This process is called mounting a file system.For example, you will frequently need to access files from CD-ROM. In order to do this, you must tell Linux, "Take the file system from this CD-ROM and make it appear under the directory /mnt." The directory given to Linux is called the mount point. In this case it is /mnt. The /mnt directory exists on all Linux systems, and it is intended specifically for use as a mount point for temporary media like floppy disks or CDs. It may be empty, or it may contain subdirectories for mounting individual devices. Generally, only the administrator (i.e. root user) may authorize the mounting of file systems.

At least one and perhaps many file systems are automatically mounted (automounting) by Linux at boot time. The system administrator can control which file systems are mounted at boot time, and can pre-determine the mount points for specific file systems. The sysadmin can also designate some file systems that may be mounted by normal users, and can specify when mounted file systems are checked for errors and backed up. All this information is stored in the file /etc/fstab, which anyone can read to discover what file systems are available and mountable by users.

Traditional filesystems also offer facilities to truncate, append to, create, move, delete and in-place modify files. They do not offer facilities to prepend to or truncate from the beginning of a file, let alone arbitrary insertion into or deletion from a file. The operations provided are highly asymmetric and lack the generality to be useful in unexpected contexts. For example, interprocess pipes in Linux have to be implemented outside of the filesystem because it does not offer truncation from the beginning of files.

Secure access to basic file system operations can be based on a scheme of access control lists or capabilities. Access control lists have been proved insecure several decades ago, which is why research operating systems tend to use capabilities. Commercial file systems still use access control lists.

File system types can be classified into disk file systems, network file systems and special purpose file systems. A myriad modules from Plan 9 fit this last category since its architecture is based on a metaphor of file system services.

Table of contents
1 Disk File Systems
2 Network File Systems
3 Special Purpose File Systems

Disk File Systems

A disk file system is a file system designed for the storage of files on a disk drive, which might be directly or indirectly connected to the computer.

Examples of disk file system include:

Some of these are journaling filesystems.

Network File Systems

A Network file system is a file system where the files are accessed over a network, potentially simultaneously by several computers.

Examples of network file systems include:

Special Purpose File Systems

A special purpose file system is basically any file system that is not disk file system or network file system. This includes systems where the files are arranged dynamically by software, intended for such purposes as communication between computer processes or temporary file space.

And many, many more.

See also file extension, UnionFS