Directory Tree Definition

A directory tree is a hierarchy of directories that consists of a single directory, called the parent directory or top level directory, and all levels of its subdirectories (i.e., directories within it).

A directory in a Unix-like operating system is a special type of file that contains a list of names and corresponding inodes for each filesystem object (i.e., directory, file or link) that appears to the user to be in it. An inode is a data structure that stores all the information about a file except its name and its actual data. A data structure is a way of storing data so that it can be used efficiently.

Any directory can be regarded as being the start of its own directory tree, at least if it contains subdirectories. Thus, a typical computer contains a large number of directory trees.

The term directory tree takes its name from the fact that a diagram of it resembles an inverted tree, or a branch thereof, usually with a series of directories branching off from a single directory, more directories branching off from some or all of them, etc.

Virtually all modern computer operating systems use directory trees for organizing files. Unix-like operating systems feature a single root directory from which all other directory trees emanate. Microsoft operating systems can have multiple independent root directories, with names such as C:, D: and E:.

The du (i.e., disk usage) command is a convenient tool for obtaining information about directory trees, including total disk space consumption of the tree (inclusive of all of the files in it) and the names and sizes of each branch and file.

Created July 11, 2005.
Copyright © 2005 The Linux Information Project. All Rights Reserved.