World Library  
Flag as Inappropriate
Email this Article

Directory (computing)

Article Id: WHEBN0005515027
Reproduction Date:

Title: Directory (computing)  
Author: World Heritage Encyclopedia
Language: English
Subject: Synthetic file system, Root directory, Apple ProDOS, Directory, Fdupes
Collection: Computer File Systems, File System Directories, File System Management
Publisher: World Heritage Encyclopedia

Directory (computing)

Screenshot of a Windows command prompt window showing a directory listing.

In computing, a directory is a file system cataloging structure which contains references to other computer files, and possibly other directories. On many computers, directories are known as folders, catalogs (catalog was used on the Apple II, the Commodore 128 and some other early home computers as a command for displaying disk contents; the filesystems used by these did not support hierarchal directories), or drawers[1] to provide some relevancy to a workbench or the traditional office file cabinet.

Files are organized by storing related files in the same directory. In a tree), a directory contained inside another directory is called a subdirectory. The terms parent and child are often used to describe the relationship between a subdirectory and the directory in which it is cataloged, the latter being the parent. The top-most directory in such a filesystem, which does not have a parent of its own, is called the root directory.


  • Overview 1
    • Folder metaphor 1.1
  • Lookup cache 2
  • See also 3
  • References 4
  • External links 5


Diagram of a hierarchal directory tree. The root directory is here called 'MFD', for Master File Directory.

Historically, and even on some modern embedded systems, the file systems either had no support for directories at all or only had a "flat" directory structure, meaning subdirectories were not supported; there were only a group of top-level directories each containing files.

Most modern Unix-like systems, especially Linux, have a standard directory structure defined by the Filesystem Hierarchy Standard.

In many operating systems, programs have an associated working directory in which they execute. Typically, file names accessed by the program are assumed to reside within this directory if the file names are not specified with an explicit directory name.

Some operating systems restrict a user's access to only their home directory or project directory, thus isolating their activities from all other users. In early versions of Unix the root directory was the home directory of the root user, but modern Unix usually uses another directory such as /root for this purpose.

In keeping with Unix philosophy, Unix systems treat directories as a type of file.[2]

Folder metaphor

Sample folder icon (from KDE).

The name folder, presenting an analogy to the file folder used in offices, and used in a hierarchical file system design for the Electronic Recording Machine, Accounting (ERMA) Mark 1 published in 1958[3] as well as by Xerox Star,[4] is used in almost all modern operating systems' desktop environments. Folders are often depicted with icons which visually resemble physical file folders.

There is a difference between a directory, which is a file system concept, and the graphical user interface metaphor that is used to represent it (a folder). For example, Microsoft Windows uses the concept of special folders to help present the contents of the computer to the user in a fairly consistent way that frees the user from having to deal with absolute directory paths, which can vary between versions of Windows, and between individual installations. Many operating systems also have the concept of "smart folders" that reflect the results of a file system search or other operation. These folders do not represent a directory in the file hierarchy. Many email clients allow the creation of folders to organize email. These folders have no corresponding representation in the filesystem structure.

If one is referring to a container of documents, the term folder is more appropriate. The term directory refers to the way a structured list of document files and folders is stored on the computer. The distinction can be due to the way a directory is accessed; on Unix systems, /usr/bin/ is usually referred to as a directory when viewed in a command line console, but if accessed through a graphical file manager, users may sometimes call it a folder.

Lookup cache

Operating systems that support hierarchical filesystems (practically all modern ones) implement a form of caching to RAM of recent pathnames lookups. In the Unix world, this is usually called Directory Name Lookup Cache (DNLC), although it is called dcache on Linux.[5]

For local filesystems, DNLC entries normally expire only under pressure from other more recent entries. For network file systems a coherence mechanism is necessary to ensure that entries have not been invalidated by other clients.[5]

See also


  1. ^ "Chapter 1: Tutorial". Using The AMIGA Workbench. Commodore-Amiga. July 1991. p. 46. The path specifies the disk name, or location, and all of the drawers that lead to the specified file. 
  2. ^ [2]
  3. ^ Barnard III, G. A.; Fein, L. (1958). "Organization and Retrieval of Records Generated in a Large-Scale Engineering Project". Proceedings of the Eastern Joint Computer Conference: 59–63.  
  4. ^ ""Xerox Star User Interface (1982)"". YouTube. Retrieved 19 November 2014. 
  5. ^ a b "Close-To-Open Cache Consistency in the Linux NFS Client". Retrieved 19 November 2014. 

External links

  • Definition of directory by The Linux Information Project (LINFO)
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.