Share to: share facebook share twitter share wa share telegram print page

Unix filesystem

Version 7 Unix filesystem layout: subdirectories of "/" and "/usr"
An overview of a Unix filesystem layout

In Unix and operating systems inspired by it, the file system is considered a central component of the operating system.[1] It was also one of the first parts of the system to be designed and implemented by Ken Thompson in the first experimental version of Unix, dated 1969.[2]

As in other operating systems, the filesystem provides information storage and retrieval, and one of several forms of interprocess communication, in that the many small programs that traditionally form a Unix system can store information in files so that other programs can read them, although pipes complemented it in this role starting with the Third Edition. Also, the filesystem provides access to other resources through so-called device files that are entry points to terminals, printers, and mice.

The rest of this article uses Unix as a generic name to refer to both the original Unix operating system and its many workalikes.

Principles

The filesystem appears as one rooted tree of directories.[1] Instead of addressing separate volumes such as disk partitions, removable media, and network shares as separate trees (as done in DOS and Windows: each drive has a drive letter that denotes the root of its file system tree), such volumes can be mounted on a directory, causing the volume's file system tree to appear as that directory in the larger tree.[1] The root of the entire tree is denoted /.

In the original Bell Labs Unix, a two-disk setup was customary, where the first disk contained startup programs, while the second contained users' files and programs. This second disk was mounted at the empty directory named usr on the first disk, causing the two disks to appear as one filesystem, with the second disk’s contents viewable at /usr.

Unix directories do not contain files. Instead, they contain the names of files paired with references to so-called inodes, which in turn contain both the file and its metadata (owner, permissions, time of last access, etc., but no name). Multiple names in the file system may refer to the same file, a feature termed a hard link.[1] The mathematical traits of hard links make the file system a limited type of directed acyclic graph, although the directories still form a tree, as they typically may not be hard-linked. (As originally envisioned in 1969, the Unix file system would in fact be used as a general graph with hard links to directories providing navigation, instead of path names.[2])

File types

The original Unix file system supported three types of files: ordinary files, directories, and "special files", also termed device files.[1] The Berkeley Software Distribution (BSD) and System V each added a file type to be used for interprocess communication: BSD added sockets,[3] while System V added FIFO files.

BSD also added symbolic links (often termed "symlinks") to the range of file types, which are files that refer to other files, and complement hard links.[3] Symlinks were modeled after a similar feature in Multics,[4] and differ from hard links in that they may span filesystems and that their existence is independent of the target object. Other Unix systems may support additional types of files.[5]

Conventional directory layout

Certain conventions exist for locating some kinds of files, such as programs, system configuration files, and users' home directories. These were first documented in the hier(7) man page since Version 7 Unix;[6] subsequent versions, derivatives and clones typically have a similar man page.[7][8][9][10][11][12]

The details of the directory layout have varied over time. Although the file system layout is not part of the Single UNIX Specification, several attempts exist to standardize (parts of) it, such as the System V Application Binary Interface, the Intel Binary Compatibility Standard, the Common Operating System Environment, and Linux Foundation's Filesystem Hierarchy Standard (FHS).[13]

Here is a generalized overview of common locations of files on a Unix operating system:

Directory or file Description
/ The slash / character alone denotes the root of the filesystem tree.
/bin
Stands for binaries and contains certain fundamental utilities, such as ls or cp, that are needed to mount /usr, when that is a separate filesystem, or to run in one-user (administrative) mode when /usr cannot be mounted. In System V.4, this is a symlink to /usr/bin. Otherwise, it needs to be on the root filesystem itself.
/boot
Contains all the files needed for successful booting process. In Research Unix, this was one file rather than a directory.[14] Nowadays usually on the root filesystem itself, unless the system, bootloader etc. require otherwise.
/dev
Stands for devices. Contains file representations of peripheral devices and pseudo-devices. See also: Linux Assigned Names and Numbers Authority. Needs to be on the root filesystem itself.
/etc
Contains system-wide configuration files and system databases; the name stands for et cetera[14] but now a better expansion is editable-text-configurations. Originally also contained "dangerous maintenance utilities" such as init,[6] but these have typically been moved to /sbin or elsewhere. Needs to be on the root filesystem itself.
/home
Contains user home directories on Linux and some other systems. In the original version of Unix, home directories were in /usr instead.[15] Some systems use or have used different locations still: macOS has home directories in /Users, older versions of BSD put them in /u, FreeBSD has /usr/home.
/lib
Originally essential libraries: C libraries, but not Fortran ones.[14] On modern systems, it contains the shared libraries needed by programs in /bin, and possibly loadable kernel module or device drivers. Linux distributions may have variants /lib32 and /lib64 for multi-architecture support.
/media
Default mount point for removable devices, such as USB sticks, media players, etc. By common sense, the directory itself, whose subdirectories are mountpoints, is on the root partition itself.
/mnt
Stands for mount. Empty directory commonly used by system administrators as a temporary mount point. By common sense, the directory itself, whose subdirectories are mountpoints, is on the root partition itself.
/opt
Contains locally installed software. Originated in System V, which has a package manager that installs software to this directory (one subdirectory per package).[16]
/proc
procfs virtual filesystem showing information about processes as files.
/root
The home directory for the superuser root - that is, the system administrator. This account's home directory is usually on the initial filesystem, and hence not in /home (which may be a mount point for another filesystem) in case specific maintenance needs to be performed, during which other filesystems are not available. Such a case could occur, for example, if a hard disk drive suffers failures and cannot be properly mounted.
/sbin
Stands for "system (or superuser) binaries" and contains fundamental utilities, such as init, usually needed to start, maintain and recover the system. Needs to be on the root partition itself.
/srv
Server data (data for services provided by system).
/sys
In some Linux distributions, contains a sysfs virtual filesystem, containing information related to hardware and the operating system. On BSD systems, commonly a symlink to the kernel sources in /usr/src/sys.
/tmp
A place for temporary files not expected to survive a reboot. Many systems clear this directory upon startup or use tmpfs to implement it.
/unix
The Unix kernel in Research Unix and System V.[14] With the addition of virtual memory support to 3BSD, this got renamed /vmunix.
/usr
The "user file system": originally the directory holding user home directories,[15] but already by the Third Edition of Research Unix, ca. 1973, reused to split the operating system's programs over two disks (one of them a 256K fixed-head drive) so that basic commands would either appear in /bin or /usr/bin.[17] It now holds executables, libraries, and shared resources that are not system critical, such as the X Window System, window managers, scripting languages, etc. In older Unix systems, user home directories might still appear in /usr alongside directories containing programs, although by 1984 this depended on local customs.[14]
/usr/include
Stores the development headers used throughout the system. Header files are mostly used by the #include directive in C language, which historically is how the name of this directory was chosen.
/usr/lib
Stores the needed libraries and data files for programs stored within /usr or elsewhere.
/usr/libexec
Holds programs meant to be executed by other programs rather than by users directly. E.g., the Sendmail executable may be found in this directory.[18] Not present in the FHS until 2011;[19] Linux distributions have traditionally moved the contents of this directory into /usr/lib, where they also resided in 4.3BSD.
/usr/local
Resembles /usr in structure, but its subdirectories are used for additions not part of the operating system distribution, such as custom programs or files from a BSD Ports collection. Usually has subdirectories such as /usr/local/lib or /usr/local/bin.
/usr/share
Architecture-independent program data. On Linux and modern BSD derivatives, this directory has subdirectories such as man for manpages, that used to appear directly under /usr in older versions.
/var
Stands for variable. A place for files that might change frequently - especially in size, for example e-mail sent to users on the system, or process-ID lock files.
/var/log
Contains system log files.
/var/mail
The place where all incoming mail is stored. Users (other than root) can access their own mail only. Often, this directory is a symbolic link to /var/spool/mail.
/var/spool
Spool directory. Contains print jobs, mail spools and other queued tasks.
/var/src
The place where the uncompiled source code of some programs is.
/var/tmp
The /var/tmp directory is a place for temporary files which should be preserved between system reboots.

See also

References

  1. ^ a b c d e Ritchie, D.M.; Thompson, K. (July 1978). "The UNIX Time-Sharing System". Bell System Tech. J. 57 (6): 1905–1929. CiteSeerX 10.1.1.112.595. doi:10.1002/j.1538-7305.1978.tb02136.x.
  2. ^ a b Ritchie, Dennis M. (1979). The Evolution of the Unix Time-sharing System. Language Design and Programming Methodology Conf.
  3. ^ a b Leffler, Samuel J.; McKusick, Marshall Kirk; Karels, Michael J.; Quarterman, John S. (October 1989). The Design and Implementation of the 4.3BSD UNIX Operating System. Addison-Wesley. ISBN 978-0-201-06196-3.
  4. ^ McKusick, Marshall Kirk; et al. "A Fast Filesystem for Unix" (PDF). Freebsd.org. CSRG, UC Berkeley. Retrieved 16 November 2016.
  5. ^ stat(2) – Linux Programmer's Manual – System Calls
  6. ^ a b hier(7) – Version 7 Unix Programmer's Manual
  7. ^ hier(7) – FreeBSD Miscellaneous Information Manual
  8. ^ hier(7) – OpenBSD Miscellaneous Information Manual
  9. ^ "hier(7) man page for 2.9.1 BSD".
  10. ^ "hier(7) man page for ULTRIX 4.2".
  11. ^ "hier(7) man page for SunOS 4.1.3".
  12. ^ hier(7) – Linux Programmer's Manual – Overview, Conventions and Miscellanea
  13. ^ George Kraft IV (1 November 2000). "Where to Install My Products on Linux?". Linux Journal. Retrieved 13 November 2014.
  14. ^ a b c d e Kernighan, Brian W.; Pike, Rob (1984). The UNIX Programming Environment. Prentice-Hall. pp. 63–65. Bibcode:1984upe..book.....K.
  15. ^ a b Ritchie, Dennis. "Unix Notes from 1972". Retrieved 14 January 2018.
  16. ^ System V Application Binary Interface Edition 4.1 (1997-03-18)
  17. ^ M. D. McIlroy (1987). "A Research Unix reader: annotated excerpts from the Programmer's Manual, 1971–1986" (PDF). Bell Labs. CSTR 139.
  18. ^ "Chapter 7. sendmail". UNICOS/mp Networking Facilities Administration. Cray. Retrieved 14 September 2013.
  19. ^ "fhs-spec revision 44".

Read other articles:

Primera División de Antigua y Barbuda Datos generalesDeporte FútbolSede Antigua y Barbuda Antigua y BarbudaConfederación ConcacafContinente CaribeNombre oficial Antigua and Barbuda Premier DivisionNombre comercial Digicel/Red Stripe Premier DivisionOrganizador ABFAEquipos participantes 16Datos históricosFundación 1968Primer campeón Arsenal (1962)Datos estadísticosCampeón actual Liberta (2018-19)Más campeonatos Empire (13)Datos de competenciaCategoría 1 Descenso a Primera Liga d...

Hankumdo Hangul 한검도 Hanja 韓劍道 Herziene Romanisatie Hangeomdo McCune-Reischauer Hankǒmdo Hankumdo (한검도) is een Koreaanse zwaardvechtkunst die ontwikkeld is door de in 1999 overleden grootmeester, Myung Jae-nam (명재남). De technieken van deze vechtkunst zijn gebaseerd op het Koreaanse schrift, hangul. Oorsprong Myung Jae Nam, die tevens de grondlegger is van hankido, wilde graag een manier ontwikkelen waarop het redelijk gemakkelijk zou zijn om het zwaard te leren hantere...

Athletics competitions at the 2019 Pan American Games International sporting eventAthletics at the 2019 Pan American GamesAthletics pictogramVenueAthletics StadiumParque KennedyDatesJuly 27 – August 11, 2019Competitors678 from 40 nations«2015 2023» International sporting eventAthletics at the2019 Pan American GamesQualificationTrack events100 mmenwomen200 mmenwomen400 mmenwomen800 mmenwomen1500 mmenwomen5000 mmenwomen10,000 mmenwomen100 m hurdleswomen110 m hurdlesmen400 m h...

Berikut adalah daftar anggota Angkatan Laut, yang ada pada manga dan anime One Piece. Admiral Armada Fleet Admiral / Gensui Pemimpin Angkatan Laut dan pimpinan tertinggi di Markas Besar Angkatan Laut Grand Line. Sengoku Admiral Tinggi Sengoku, pemimpin tertinggi di badan Angkatan Laut, pertama kali muncul pada cerita 234:Ingat Baik Baik, (volume 25). Sengoku kelihatan sangat bijak, tetapi tegas. Ia memiliki kekuatan yang dapat berubah menjadi raksasa seperti Budha, oleh karena itu ia dijuluki...

PT PP Presisi TbkSebelumnyaPT Prima Jasa Aldodua (2004-2014)PT PP Alat Konstruksi (2014-2014)PT PP Peralatan Konstruksi (2014-2017)JenisAnak perusahaanKode emitenIDX: PPREIndustriKonstruksiDidirikan6 Mei 2004; 19 tahun lalu (2004-05-06)KantorpusatJakarta, IndonesiaWilayah operasiIndonesiaTokohkunciRully Noviandar[1](Direktur Utama)Yul Ari Pramuraharjo[1](Komisaris Utama)JasaPembukaan lahan proyekPemaprasan dan pengurukan tanahPengerasan jalanPemasangan bekistingKontraktor...

Pour les articles homonymes, voir Pont de l'Amitié. Pont de l'amitié Le pont de l'amitié de 1993. Géographie Département Moselle Land Sarre Commune Grosbliederstroff et Kleinblittersdorf Coordonnées géographiques 49° 09′ 25″ N, 7° 01′ 55″ E Fonction Franchit Sarre Fonction passerelle piétonne Caractéristiques techniques Type Pont en poutre Longueur 140,22 m Portée principale 14,20 m Largeur 3,50 m Matériau(x) Béton armé et ac...

A. AlagiriswamiHakim Mahkamah Agung IndiaMasa jabatan17-10-1972–16-10-1975 Informasi pribadiKebangsaanIndiaProfesiHakimSunting kotak info • L • B A. Alagiriswami adalah hakim Mahkamah Agung India. Ia mulai menjabat sebagai hakim di mahkamah tersebut pada 17-10-1972. Masa baktinya sebagai hakim berakhir pada 16-10-1975.[1] Referensi ^ Daftar Hakim di Mahkamah Agung India. Mahkamah Agung India. Diakses tanggal 10 Juni 2021.  Artikel bertopik biografi India ini adala...

Defunct railway station in New Zealand MangamahoeNew Zealand Government Railways (NZGR)regional railGeneral informationLocationStation Road, Wellington 5882, New ZealandCoordinates40°43′47.70″S 175°43′31.44″E / 40.7299167°S 175.7254000°E / -40.7299167; 175.7254000Owned byRailways DepartmentLine(s)Wairarapa LinePlatformsSingle sideTracksMain (x 1)HistoryOpened10 January 1887 (1887-01-10)[1]Closed1 August 1966 (1966-08-01...

Season of television series Big Brother NaijaAlso known asBig Brother Nigeria BBNajiaCountry of originNigeriaOriginal languageEnglishNo. of series8Original releaseNetworkAfrica Magic (2017- Present)M-Net (2006)Release5 March 2006 (2006-03-05) –present Big Brother Naija, formerly known as Big Brother Nigeria, is a Nigerian reality competition television series, based on the Big Brother television franchise, in which, contestants live in an isolated house and compete for a large cas...

Japanese manga magazine AriaCover of Aria's September 2010 issue, featuring Aki Mochida and Yoko Maki's Pika Ichi.CategoriesShōjo/Josei manga[1][2]FrequencyMonthlyCirculation12,050[1](July-September, 2016)First issueJuly 28, 2010[3]Final issueApril 28, 2018[4]CompanyKodanshaCountryJapanBased inTokyoLanguageJapaneseWebsitehttp://aria-comic.jp/ Aria was a Japanese monthly josei/shōjo manga magazine published by Kodansha. In April 2010 an announcement wa...

This article does not cite any sources. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Darker video game – news · newspapers · books · scholar · JSTOR (July 2017) (Learn how and when to remove this template message) 1995 video gameDarkerPublisher(s)PsygnosisDesigner(s)Jas.C.BrookeLyndon BrookePlatform(s)MS-DOSRelease1995Genre(s)Flight simulatorMode(s)Single-p...

HEGeorge Tomehجورج طعمةTomeh as President of the UN Security Council5th Syrian Permanent Representative to the United NationsIn office1965–1972PresidentAmin al-HafizNureddin al-AtassiHafez al-AssadDeputyYahya ArodakiPreceded bySalah el-Dine TaraziSucceeded byHaissam Kelani Personal detailsBorn1922Al-Midan, Damascus, French mandate of SyriaDied2004Amman, JordanNationalitySyria, United StatesAlma materAmerican University of Beirut, Georgetown UniversityProfessionPolitician, Diplom...

Roller coaster This article does not cite any sources. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Silver Streak Canada's Wonderland – news · newspapers · books · scholar · JSTOR (March 2019) (Learn how and when to remove this template message) Silver StreakCanada's WonderlandLocationCanada's WonderlandPark sectionKidZvilleCoordinates43°50′33″N 79°32...

2001 soundtrack album by various artists Music from the Motion Picture HardballSoundtrack album by Various artistsReleasedSeptember 11, 2001Recorded2001StudioSouthSide Studios (Atlanta, Georgia)Battery Studios (New York City, New York)Quad Recording Studios (Times Square, New York)The Hit Factory (New York City, New York)Infinite Studios (Alameda, California)Rockland Studios (Chicago, Illinois)Sound On Sound (New York City, New York)Cash Money StudiosGenreHip hopR&BLength47:16LabelSo ...

Mother of octuplets Not to be confused with Natalie Suleyman. Natalie SulemanSuleman in 2011BornNadya Denise Doud-Suleman (1975-07-11) July 11, 1975 (age 48)Fullerton, California, U.S.Other namesNatalie Denise Suleman (current full name)Known forSuleman octupletsSpouse Marcos Gutierrez ​ ​(m. 1996; div. 2008)​Children14ParentsEdward Doud Suleman (father)Angela Victoria Stanaitis (mother) Natalie Denise Suleman (born Nadya Denise D...

Location of Velingrad Peninsula on Graham Coast, Antarctic Peninsula. Loqui Point (65°55′S 64°58′W / 65.917°S 64.967°W / -65.917; -64.967) is a point at the northern extremity of Velingrad Peninsula on the west coast of Graham Land, Antarctica. It marks the south side of the entrance to Barilari Bay. This feature was discovered and named Cap Garcia by the French Antarctic Expedition, 1903–05, under Jean-Baptiste Charcot. At the same time Charcot gave the name...

German boxer Eric SeeligBornErich Seelig(1910-07-15)July 15, 1910Bromberg, German EmpieeDiedJanuary 19, 1984(1984-01-19) (aged 73)Atlantic City, New Jersey, U.S.NationalityGerman by birthNationalized American citizenStatisticsWeight(s)MiddleweightLight heavyweightHeight5 ft 8 in (1.73 m)StanceOrthodox Boxing recordTotal fights62Wins41Wins by KO8Losses14Draws17 Eric Seelig (July 15, 1909, in Bromberg, now Bydgoszcz – January 19, 1984) was middleweight boxing champion in G...

CDCA redirects here. For the Commission on Dental Competency Assessments, see Commission on Dental Competency Assessments. U.S. federal district court in California United States District Court for the Central District of California(C.D. Cal.)Divisions of the Central District of California : Eastern (yellow), Southern (red), and Western (blue)LocationEdward R. Roybal Federal Building and U.S. Courthouse(Los Angeles)More locationsNew United States Courthouse(Los Angeles)Ronald Reagan Fede...

German naturalist and zoologist For the figure skater, see Alexander König. Alexander Koenig. Alexander Ferdinand Koenig (20 February 1858 – 16 July 1940) was a German naturalist and zoologist. Making use of the family wealth earned from the sugar business, he went on collection expeditions and founded what is now known as the Museum Koenig in Bonn in 1912. Biography Box used in one of Koenig's expeditions, exhibited in Museum Koenig Koenig was born at St Petersburg, Russia, the third ...

Mountains with prominence over 150m MarilynMarilyns in the British Isles (red dots)Highest pointElevationno requirementProminenceover 150 m (492 ft)GeographyLocation British Isles: 2,010 Scotland: 1,218 Ireland: 454 England: 174 Wales: 159 Isle of Man: 5 This is a list of Marilyn hills and mountains in the United Kingdom, Republic of Ireland and surrounding islands and sea stacks. Marilyns are defined as peaks with a prominence of 150 metres (492 ft) or more, regardless of...

Kembali kehalaman sebelumnya