Learn

Whether it is playing music, looking at photos, or watching a movie, computers are responsible for holding a lot of data. Having this data be stored safely in an efficient way is critical for the operation of any computer and the filesystem is the component within the operating system that handles this.

The filesystem is the data structure used by the operating system to store and retrieve data. This is a software abstraction that allows developers to manipulate data without having to be concerned with the minutiae of how each storage device works.

This data is organized into files that are units of storage used to describe a self-contained piece of data. Each file has a format depending on what that file contains. This is indicated by the file’s extension that follows the file’s name.

Some common extensions and their file types:

  • .txt for text files
  • .doc for Microsoft Word files
  • .jpg for image files encoded using the JPEG compression algorithm

These files are in turn organized into directories. A directory is a data structure that contains references to files and other directories. They are typically organized in a hierarchical tree structure called a directory tree, as shown in the image on the right.

In this lesson, we’ll learn about the metadata and permissions that organize files, the layers of abstraction that make up a filesystem, and common operations for files and directories.

Instructions

To the right is an example of the hierarchical tree structure created when directories contain files as well as other directories.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?