The filing structure of the UNIX operating system is hierarchical. It is a tree structured system, completely open (assuming necessary permissions) to every user on the system, with everything emerging from / (root) at the top.
Figure 2.1 illustrates this concept.
Figure 2.1: Structure of File System
Every directory has a parent, and-possibly-one or more children. Those children can in turn be parents.
A directory is a special type of file. A file and a directory of the same name within the same directory is therefore impossible.
NOTE that a file is a linear sequence of characters, including
line feeds (
n); there is no
specific file structure.
Everything in UNIX is considered a file: a directory is a special kind of file, and so is the keyboard (/dev/kbd) and the system's console (/dev/console).