Directory (computing)

Screenshot of a Microsoft 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, or drawers,[1] analogous to a workbench or the traditional office filing cabinet. The name derives from books like a telephone 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 a hierarchical file system (that is, one in which files and directories are organized in a manner that resembles 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.

The freedesktop.org media type for directories within many Unix-like systems – including but not limited to systems using GNOME, KDE Plasma 5, or ROX Desktop as the desktop environment – is "inode/directory".[2] This is not an IANA registered media type.

Overview

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 is hard linked so it appears in two directories.

Historically, and even on some modern embedded 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 were 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 a path.

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 only to 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.[3] 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 and system calls that return records, not a byte-stream.[4]

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[5] as well as by Xerox Star,[6] 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).[original research?] 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" or virtual 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. [citation needed] The term directory 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 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 path lookups. In the Unix world, this is usually called Directory Name Lookup Cache (DNLC), although it is called dcache on Linux.[7]

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.[7]

See also

References

  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. ^ Leonard, Thomas (2018-10-02). "Shared MIME-info Database". X Desktop Group. Non-regular files. Retrieved 2023-03-13.
  3. ^ "Everything is a File". Behavior Genetics Association. c. 2002. Archived from the original on March 10, 2012. Retrieved April 30, 2021.
  4. ^ "readdir(3) — Linux manual page". The Linux man-pages project. 2021-03-22. Retrieved November 27, 2022.
  5. ^ 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.
  6. ^ ""Xerox Star User Interface (1982)"". YouTube. 28 August 2009. Archived from the original on 2021-12-21. Retrieved 19 November 2014.
  7. ^ a b "Close-To-Open Cache Consistency in the Linux NFS Client". Citi.umich.edu. Retrieved 19 November 2014.

Read other articles:

.galIntroduced13 March 2014TLD typeGeoTLDStatusActiveRegistryAsociación PuntoGalSponsorAsociación PuntoGalIntended use Galicia and Galician cultureRegistration restrictionsUnknownStructureRegistrations would be taken directly at second levelDNSSECYesRegistry websitedominio.gal .gal (Galician pronunciation: [ˈpuntʊ ˈɣal]) is a GeoTLD intended to highlight the Galician people, Galician language, and Galician culture. It was approved on 14 June 2013 by ICANN, and the first 93 domai...

 

Amir-Abbas Hoveyda (em persa: امیرعباس هویدا; Amīr `Abbās Hoveyda, 18 de fevereiro de 1919 – 7 de abril de 1979) foi um economista e político iraniano. Ele foi primeiro-ministro do Irão entre 27 de janeiro de 1965 e 7 de agosto de 1977. Foi primeiro-ministro durante mais de 12 anos e foi o primeiro-ministro iraniano que teve o mandato mais longo na história do Irã. Ele também foi Ministro das Finanças no gabinete de Hassan-Ali Mansur. Depois da Revolução Iraniana foi ...

 

Circunscripción de LanzaroteCortes Generales* Senado: 1 senador (de 266)Parlamento de Canarias* 8 escaños (de 70)Cabildo Insular de Lanzarote* 23 escaños (de 23) Lanzarote es una circunscripción electoral española, utilizada como distrito electoral para el Senado, que es la Cámara Alta del Parlamento español. Se corresponde con la isla de Lanzarote, que pertenece a Canarias, y elige 1 senador.[1]​ Asimismo, Lanzarote es una de las 8 circunscirpciones del Parlamento de Canarias pa...

У Вікіпедії є статті про інші значення цього терміна: Кров (значення). КровBlood Жанр трилердрамакриміналРежисер Нік МерфіПродюсер Піппа ГаррісНік ЛоусНікола ШиндлерСценарист Білл ГаллахерУ головних ролях Пол БеттаніСтівен ГремМарк СтронгБрайан КоксЗої ТапперБен Кром

 

Location of Dent County in Missouri This is a list of the National Register of Historic Places listings in Dent County, Missouri. This is intended to be a complete list of the properties and districts on the National Register of Historic Places in Dent County, Missouri, United States. Latitude and longitude coordinates are provided for many National Register properties and districts; these locations may be seen together in a map.[1] There are 8 properties and districts listed on the N...

 

Massacre of Jews by Poland Pinsk massacrePhotographs of those executedLocationPinskDateApril 5, 1919TargetJewish Bolshevik infiltratorsAttack typeSummary executionsDeaths35 JewsPerpetratorsGeneral Antoni ListowskiMajor Aleksander Narbutt-Łuczyński of the Polish Army The Pinsk massacre was the mass execution of thirty-five Jewish residents of Pinsk on April 5, 1919, by the Polish Army. The Polish commander sought to terrorize the Jewish population after claiming to being warned by two Jewish...

BayshoreOttawa Transitway stationGeneral informationLocationOttawa, OntarioCanadaCoordinates45°20′45″N 75°48′34″W / 45.34583°N 75.80944°W / 45.34583; -75.80944Owned byOC TranspoPlatforms2ConstructionParkingNoBicycle facilitiesYesOther informationStation code3050HistoryOpenedDecember 14, 2000ClosedApril 24, 2022 [1]RebuiltUnder rebuildServices Preceding station OC Transpo Following station Bells CornersTerminus Route 57 Lincoln Fieldstoward Tunney's ...

 

Law school of Duquesne University This article is about school of law on the campus of Duquesne University in Pittsburgh, Pennsylvania. For the law school on the campus of Drexel University in Philadelphia, Pennsylvania, named for the same person, see Thomas R. Kline School of Law. Thomas R. Kline School of Law of Duquesne UniversityMottoSalus Populi Suprema LexThe Welfare of the People is the Highest LawParent schoolDuquesne UniversityReligious affiliationRoman Catholic (Spiritan Fathers)Est...

 

Form of metal Nugget of native platinum (Kondyor mine, Khabarovsk Krai, Russia) A native metal is any metal that is found pure in its metallic form in nature.[1][2] Metals that can be found as native deposits singly or in alloys include aluminium[citation needed], antimony, arsenic, bismuth, cadmium, chromium, cobalt, indium, iron, manganese, molybdenum, nickel, niobium, rhenium, selenium, tantalum, tellurium, tin, titanium, tungsten, vanadium, and zinc, as well as the...

Subdivision in West Bengal, IndiaChinsurah subdivisionSubdivisionBandel Church, founded in 1599, by the Portuguese, the oldest place of Christian worship in BengalCoordinates: 22°54′N 88°23′E / 22.90°N 88.39°E / 22.90; 88.39Country IndiaStateWest BengalDistrictHooghlyHeadquartersHugli-ChuchuraArea • Total1,148.15 km2 (443.30 sq mi)Population (2011) • Total1,657,518 • Density1,400/km2 (3,700/sq mi...

 

En este artículo sobre guerra se detectaron varios problemas. Por favor, edítalo y/o discute los problemas en la discusión para mejorarlo: Necesita ser wikificado conforme a las convenciones de estilo de Wikipedia. Carece de fuentes o referencias que aparezcan en una fuente acreditada. Este aviso fue puesto el 27 de junio de 2018. Regimiento de Infantería Nápoles N.º 4 de Paracaidistas» Activa 1 de enero de 2016 - presentePaís  EspañaRama/s Ejército de TierraTipo Infanter...

 

Чугуївське військове училище Нагрудний знак училищаКраїна Російська імперіяМарш «Ой на горі та й женці жнуть»[1]Розпущено 1918 Чугу́ївське військо́ве учи́лище (до 1910: Чугуївське піхотне юнкерське училище) — військовий навчальний заклад Російської імперії. Дислок...

Series of pogroms in Odessa, Ukraine (1821–1905)Members of the Jewish Labour Bund with bodies of their comrades killed in Odessa during the Russian Revolution of 1905. A series of pogroms against Jews in the city of Odessa, Ukraine, then part of the Russian Empire, took place during the 19th and early 20th centuries. They occurred in 1821, 1859, 1871, 1881 and 1905.[1] According to Jarrod Tanny, most historians in the early 21st century agree that the earlier incidents were a result...

 

Action-adventure video game based on Samurai Jack 2020 video gameSamurai Jack: Battle Through TimeDeveloper(s)Soleil Ltd.[a]Publisher(s)Adult Swim GamesDirector(s)Hiroaki Matsui[2]Producer(s)Yoshifuru Okamoto[2]Designer(s)Noboru Matsumoto[2]Programmer(s)Yoshihiro Ueno[2]Artist(s)Marcos Ramos[2]Writer(s)Darrick Bachman[2]Composer(s)Yuichi Baba[2]Masanori Otsuka[2]Hiroshi Watanabe[2]Tomoyo Nishimoto[2]Shinya...

 

Rajasthani language spoken in India HadautiHadotiहाड़ौती, हाड़ोतीThe word Hadauti written in Devanagari scriptNative toIndia (Hadoti region of Rajasthan)RegionHadautiNative speakers2,944,356 (2011 census)[1]Census results conflate some speakers with Hindi.[2]Language familyIndo-European Indo-IranianIndo-AryanWesternRajasthaniHadautiWriting systemDevanagariLanguage codesISO 639-3hojGlottologhado1235A map of the distribution of native Hadaut...

Tonga aux Jeux olympiques d'été de 2016 Code CIO TGA Lieu Rio de Janeiro Participation 9e Athlètes 7 dans 4 sports Porte-drapeau Pita Taufatofua (ouverture)Siueni Filimone (clôture) MédaillesRang : Or0 Arg.0 Bron.0 Total0 Tonga aux Jeux olympiques d'été Tonga aux Jeux olympiques d'été de 2012 Tonga aux Jeux olympiques d'été de 2020 modifier  Les Tonga participent aux Jeux olympiques d'été de 2016 à Rio de Janeiro au Brésil. Il s'agit de leur 9e participation aux ...

 

Third wife of Mao Zedong In this Chinese name, the family name is He. He Zizhen贺子珍He Zizhen, 1947Born(1910-09-20)20 September 1910Yunshan, Jiangxi, Qing DynastyDied19 April 1984(1984-04-19) (aged 73)Shanghai, People's Republic of ChinaOther namesVen Iun, He GuiyuanPolitical partyChinese Communist PartySpouse Mao Zedong ​ ​(m. 1928; div. 1937)​ChildrenYang Yuehua, Li Min and 4 moreChinese nameTraditional Chinese賀子珍Simpl...

 

Father of John the Baptist Not to be confused with Zechariah (Hebrew prophet) or Zechariah of Israel. SaintZechariahAnnunciation of the Angel to Zechariah by Domenico Ghirlandaio (1490, fresco in the Tornabuoni Chapel, Florence)Priest, Prophet, Guardian of Mary,Devotee, Martyr[1]Born1st century BCDied1st century BC (or early 1st century AD)Jerusalem (Matthew 23:35), the LevantVenerated inCatholic ChurchEastern Orthodox ChurchOriental Orthodox ChurchAnglicanismLutheranismIslamCano...

Saigon UniversityTrường Đại học Sài GònTypePublic universityEstablished2007RectorPhạm Hoàng QuânStudents~21,000 (2021)Address273 An Dương Vương, Ward 3, Ho Chi Minh City, District 5, Vietnam10°45′36″N 106°40′55″E / 10.760°N 106.682°E / 10.760; 106.682CampusUrbanColoursTeal, Sky Blue and White    Websitewww.sgu.edu.vn Saigon University (SGU) is a public university located in Ho Chi Minh City, Vietnam. The university offers ov...

 

У Вікіпедії є статті про інші значення цього терміна: Черниця (значення). МонахиняThe Nun Жанр ЖахиРежисер Корін ГардіПродюсер Пітер СафранДжеймс ВанМайкл КліарСценарист Гарі ДоберманДжеймс ВанУ головних ролях Таїсса Фарміґа, Бонні Ааронс, Шарлотта Хоуп, Деміан Бішір, Інг...

 

Strategi Solo vs Squad di Free Fire: Cara Menang Mudah!