Module Two - Session 09: Filesystem Theory

Users always feel the filesystem (read only 5.10.1) is the most important part of an Operating System. This is because the filesystem allows the users to create data (files) and store them long term.

Filesystems can perform the following actions:

Most of these actions we are familiar with. Create will create a file, while delete will delete a file. You can set attributes on a file and even get a listing of those attributes.

A filesystem can store data, but how does it actually keep track of where the data is stored? There are several common methods that are used:

  1. Field
  2. Record
  3. File
  4. Database

How do we keep track of how files are organized within a filesystem?

  1. The Pile
  2. Sequential File
  3. Indexed Sequential File
  4. Indexed File
  5. Direct/hashed file

A filesystem stores files, and we have to have away of viewing these files. How can we go about doing this? This is where a file management system comes into play. This is a piece of software that provides the ability to the user to use/view those files. We are actually very used to using these.

As a user/programmer we do not have to worry about creating a way to access files. This is what our filesystem and file management system does for us. They provide us quick and easy access to a file as requested.

File Extensions is the part that comes after the "." and you can have multiple ones too! In Linux/Unix file extensions are not enforced, these are used more to remind the user more then anything else. In Windows the OS is actually aware of the file extensions and can be used for launching applications as needed. OS X is like Windows.

diagram of files and file types

We also have different types of files. The file we are probably most use to use is a regular file, which contains user information. Another type of file we are use to using is a directory, which is used for maintaining the filesystem structure. Finally, we have the character and block special files. These are ones that we are not as familiar with, but are just as important.

A filesystem also has directories. Directories are a great feature in a filesystem as they keep us organized. Directories also contain a lot of information as well. They contain their own set of attributes, the location and ownership information. We looked at the operations we can do on a file, so let us quickly look at the directory operations we can perform that are related to files:

Directories also have other operations that do not relate to files.

These operations should be familiar to you already, as we have been doing a majority of these over the years. The update directory is the only one that probably is not familiar. Basically when a file has its attributes updated we might also need to update the directory to reflect those changes.

Here are some terms that can also help you in your Linux journey:


Original webpage by Petersen Gross, modified by William Albritton.