next up previous contents
Next: Links Up: Basic File System Concepts Previous: Inodes



Directories are structured in a hierarchical tree. Each directory can contain files and subdirectories.

Directories are implemented as a special type of files. Actually, a directory is a file containing a list of entries. Each entry contains an inode number and a file name. When a process uses a pathname, the kernel code searchs in the directories to find the corresponding inode number. After the name has been converted to an inode number, the inode is loaded into memory and is used by subsequent requests.

Figure gif represents a directory.

ext2fs/dir 7cm 5cm Structure of a directory

Andrew Anderson
Thu Mar 7 22:36:29 EST 1996