Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Directory (computing)

From Wikipedia, the free encyclopedia
(Redirected fromSubdirectory)
File system structure for locating files
Screenshot of aMicrosoft Windowscommand prompt window showing a directory listing.

Incomputing, adirectory is afile system cataloging structure that contains references to othercomputer files, and possibly other directories. On many computers, directories are known asfolders ordrawers,[1]analogous to aworkbench or the traditional officefiling cabinet. The name derives from books like atelephone directory that lists the phone numbers of all the people living in a certain area.

Files are organized by storing related files in the same directory. In ahierarchical file system (that is, one in which files and directories are organized in a manner that resembles atree), a directory contained inside another directory is called asubdirectory. The termsparent andchild 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 theroot directory. InPOSIX compliant operating systems the special files. (dot) and.. (dot-dot) are special files representing the current and current's parent directory respectively. The parent ofroot is circularly defined as itself.[2]

Thefreedesktop.org media type for directories within manyUnix-like systems – including but not limited to systems usingGNOME,KDE Plasma 5, orROX Desktop as the desktop environment – is "inode/directory".[3] This is not anIANA registered media type.

Overview

[edit]
Diagram of a hierarchical directory tree. The root directory is here called "MFD", for Master File Directory. Usually a file can only be in one directory at a time, but here File 2 ishard linked so it appears in two directories.

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

A reference to a location in a directory system is called apath.

In manyoperating systems, programs have an associatedworking 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 auser's access only to theirhome 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 theroot user, but modern Unix usually uses another directory such as/root for this purpose.

In keeping withUnix philosophy, Unix systems treat directories as a type of file.[4] Caveats include not being able to write to a directory file except indirectly by creating, renaming, and removing file system objects in the directory and only being able to read from a directory file using directory-specific library routines andsystem calls that return records, not a byte-stream.[5]

Folder metaphor

[edit]
Sample folder icon (fromKDE).

The namefolder, presenting an analogy to thefile folder used in offices, and used in a hierarchical file system design for theElectronic Recording Machine, Accounting (ERMA) Mark 1 published in 1958[6] as well as byXerox Star,[7] is used in almost all modernoperating systems' desktop environments. Folders are often depicted withicons that visually resemble physical file folders.

There is a difference between adirectory, which is afile system concept, and thegraphical user interface metaphor that is used to represent it (afolder).[original research?] For example,Microsoft Windows uses the concept ofspecial 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" orvirtual folders that reflect the results of a file system search or other operation. These folders do not represent a directory in the file hierarchy. Manyemail clients allow the creation of folders to organize email. These folders have no corresponding representation in the filesystem structure.

If one is referring to acontainer of documents, the termfolder is more appropriate.[citation needed] The termdirectory refers to the way a structured list of document files and folders are 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 acommand lineconsole, but if accessed through a graphicalfile manager, users may sometimes call it a folder.

Lookup cache

[edit]
[icon]
This sectionneeds expansion. You can help byadding to it.(December 2013)

Operating systems that support hierarchical filesystems (practically all modern ones) implement a form ofcaching toRAM of recentpath lookups. In theUnix world, this is usually calledDirectory Name Lookup Cache (DNLC), although it is calleddcache onLinux.[8]

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

See also

[edit]
Concepts
Commands

References

[edit]
  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. ^"Draft Standard for Information Technology— Portable Operating System Interface (POSIX® )"(PDF).www.open-std.org. Portable Applications Standards Committee of the IEEE Computer Society and The Open Group. 2007. p. 99. RetrievedMar 29, 2025.
  3. ^Leonard, Thomas (2018-10-02)."Shared MIME-info Database".X Desktop Group. Non-regular files. Retrieved2023-03-13.
  4. ^"Everything is a File".Behavior Genetics Association. c. 2002. Archived fromthe original on March 10, 2012. RetrievedApril 30, 2021.
  5. ^"readdir(3) — Linux manual page". The Linux man-pages project. 2021-03-22. RetrievedNovember 27, 2022.
  6. ^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.doi:10.1109/AFIPS.1958.75.
  7. ^""Xerox Star User Interface (1982)"".YouTube. 28 August 2009.Archived from the original on 2021-12-21. Retrieved19 November 2014.
  8. ^ab"Close-To-Open Cache Consistency in the Linux NFS Client". Citi.umich.edu. Retrieved19 November 2014.

External links

[edit]
Wikimedia Commons has media related toFile system directories.
Types
Properties
Organisation
Operations
Linking
Management
Retrieved from "https://en.wikipedia.org/w/index.php?title=Directory_(computing)&oldid=1282953736"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp