Lably
Skip to content

Hierarchical file system

  • 4 min read
  • 2 chapters

Related on Lably

Through Computing, File system and Path (computing)

In a hierarchical file system, directories contain information about both files and other directories, called subdirectories which, in turn, can point to other subdirectories, and so on. This is organized as a tree structure, or hierarchy, generally portrayed with the root at the top. The root directory is the base of the hierarchy, and is usually stored at some fixed location on disk.

A hierarchical file system contrasts with a flat file system, where information about all files is stored in a single directory, and there are no subdirectories.

Almost all file systems today are hierarchical. What is referred to as a file system is a specific instance of a hierarchical system. For example, NTFS, HPFS, and ext4, all implement a hierarchical system with different features for buffering, file allocation, and file recovery.

Concepts

Path

A file path is a string of characters that contains the location of a file in a computer's file structure. That is, it represents the directory nodes visited from the root directory to the file as a list of node names, with the items in the list separated by path separators. The path separator is > on Multics, / on Unix-like systems, and \ on MS-DOS 2.0 and later, Windows, and OS/2 systems.

An absolute path begins at the root directory; that is, begins with a path separator character, which, at the beginning of a path, represents the root directory. A path consisting only of a path separator character refers to the root directory.

Working directory

The working directory of a process is a directory dynamically associated with each process. Files are searched relative to the working directory, rather than from the root directory. At logon, the user's working directory is set to their home directory; it can be set afterwards by using a command.

A relative path represents the directory nodes visited from the working directory to the file, rather than from the root directory to the file. A relative path does not begin with a path separator character.

Sign in to keep reading

One more chapter is free with a Lably account.

More in Computing and communication