A directory is a unique type of file that contains only the information needed to access files or other directories. As a result, a directory occupies less space than other types of files. It also gives the file system structure flexibility and depth. Directories enable you to group files and other directories, allowing you to organize the file system into a modular hierarchy. Unlike other types of files, a special set of commands control directories.
Directories contain directory entries.
To increase speed and enhance use of disk space, the data in a file is stored at various locations in the computer's memory. The i-node contains the addresses used to locate all the scattered blocks of data associated with a file. The i-node also records other information about the file including time of modification and access, access modes, number of links, file owner, and file type. It is possible to link several names for a file to the same i-node by creating directory entries with the ln command. Because directories often contain information that should not be available to all users of the system, directory access can be protected.