Unix filesystem: Difference between revisions

Content deleted Content added
m Reverted 1 edit by 74.117.105.67 (talk) to last revision by Bagumba (TW)
No edit summary
Tags: missing file added references removed
Line 1:
{{Redirect|Usr||USR (disambiguation){{!}}USR}}
{{Redirect|Unix file system|UFS, a specific file system used by many Unix and Unix-like operatingong systems|Unix File System}}
[[File:Version 7 UNIX SIMH PDP11 Filesystem Layout.png|thumb|[[Version 7 Unix]] filesystem layout: subdirectories of "/" and "/usr"]]
[[File:Standard-unix-filesystemfile-hierarchy.svg|thumb|An overview of a [[Unix]] filesystem layout]]
 
In [[Unix]] and [[operating system]]s inspired by it, the [[file system]] is considered a central component of the operating system.<ref name=" Ritchie">{{cite journal |last1= Ritchie |first1= D.M. |authorlink1= Dennis Ritchie |last2= Thompson |first2= K. |authorlink2= Ken Thompson |title= The UNIX Time-Sharing System |journal= Bell System Tech. J. |volume= 57 |issue= 6 |pages= 1905–1929 |date= July 1978 |doi=10.1002/j.1538-7305.1978.tb02136.x|citeseerx= 10.1.1.112.595 }}</ref> 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, [[History of Unix|dated 1969]].<ref name="evolution"/>
Line 10:
The rest of this article uses ''Unix'' as a [[Generic trademark|generic name]] to refer to both the original Unix operating system and its many [[Unix-like|workalikes]].
 
==P------------------------s==
==Principles==
The filesystem appears as one [[rooted tree]] of directories.<ref name="Ritchie"/> Instead of addressing separate volumes such as [[Disk partitioning|disk partitions]], removable media, and [[network share]]s as separate trees (as done in [[DOS]] and [[Microsoft Windows|Windows]]: each ''drive'' has a drive letter that denotes the root of its file system tree), such volumes can be ''[[mount (Unix)|mounted]]'' on a directory, causing the volume's file system tree to appear as that directory in the larger tree.<ref name="Ritchie"/> The root of the entire tree is denoted <code>/</code>.
 
Line 25:
 
==Conventional directory layout==
Certain conventions exist for locating some kinds of files, such as programs, system configuration files, and users' [[home directory|home directories]]. These were first documented in the <code>hier(7)</code> [[man page]] since [[Version 7 Unix]];<ref name="v7">{{man|7|hier|v7}}</ref> subsequent versions, derivatives and clones typically have a similar man page.<ref>{{man|7|hier|FreeBSD}}</ref><ref name="openbsd">{{man|7|hier|OpenBSD}}</ref><ref>{{cite web|title=hier(7) man page for 2.9.1 BSD|url=http://www.freebsd.org/cgi/man.cgi?query=hier&manpath=2.9.1+BSD}}</ref><ref>{{cite web|title=hier(7) man page for ULTRIX 4.2|url=http://www.freebsd.org/cgi/man.cgi?query=hier&manpath=ULTRIXULTRI---------------X+4.2}}</ref><ref>{{cite web|title=hier(7) man page for SunOS 4.1.3|url=http://www.freebsd.org/cgi/man.cgi?query=hier&manpath=SunOS+4.1.3}}</ref><ref>{{man|7|hier|Linux}}</ref>
 
The details of the directory layout have varied over time. Although the file system layout is not partjbkvjcghfgv,bjkvycfbgn mpart of the [[Single UNIX Specification]], several attempts exist to standardize (parts of) it, such as the [[UNIX System V|System V]] [[Application Binary Interface]], the [[Intel Binary Compatibility Standard]], the Common Operating System Environment, and [[Linux Foundation]]'s [[Filesystem Hierarchy Standard]] (FHS).<ref>{{cite web |title=Where to Install My Products on Linux? |url=http://www.linuxjournal.com/article/4121 |website=[[Linux Journal]] |date=1 November 2000 |author=George Kraft IV |accessdate=13 November 2014}}</ref>
 
Here is a generalized overview of common locations of files on a Unix operating system:
Line 51:
|
:<code>/etc</code>
|Contains system-wide configuration files and system databases; the name stands for ''[[et cetera]]''.<ref name="upe">{{cite book |first1=Brian W. |last1=Kernighan |authorlink1=Brian Kernighan |first2=Rob |last2=Pike |authorlink2=Rob Pike |title=The UNIX Programming Environment |publisher=Prentice-Hall |year=1984 |pages=63–65|title-link=The UNIX Programming Environment }}</ref> Originally also contained "dangerous maintenance utilities" such as <code>init</code>,<ref name="v7"/> but these have typically been moved to <code>/sbin</code> or elsewhere. Needs to be on the root filesystem itself.p
|-
|
:<code>/home</code>
Line 134 ⟶ 133:
|-
|
::<code>/mail</codemcode>
|The place where all incoming mail is stored. Users (other than <code>root</code>) can access their own mail only. Often, this directory is a [[symbolic link]] to <code>/var/spool/mail</code>.
|-
Line 153 ⟶ 152:
*[[Btrfs]]
*[[ext2]]
*[[ext3]]loyxgvbnkjhile system)|HAMMER]]
*[[ext4]]
*[[Filesystem Hierarchy Standard]]
*[[HAMMER (file system)|HAMMER]]
*[[JFS (file system)]]
*[[Unix File System]]