unix-directory


Unix directory structure

From Wikipedia, the free encyclopedia

In Unix and Unix-like operating systems, the Unix directory structure is a convention for filesystem layout.

Several attempts exist to standardize the Unix filesystem layout, such as the "Filesystem Hierarchy Standard,"[1] however, targeted primarily at Linux. Also, as part of the "Linux Standards Base", a common filesystem layout is defined, to encourage interoperability among different Linux distributions.[2]

What follows is a generalized overview of common locations of files in a Unix operating system:

  • / — the slash / character alone denotes the root of the virtual filesystem tree.
  • /bin — stands for "binaries" and contains certain fundamental utilities, such as ls or cp, needed by all users.
  • /sbin — stands for "system (or "superuser") binaries" and contains fundamental utilities, such as init, usually needed to start, maintain and recover the system.
  • /etc — contains configuration files and system databases.
  • /dev — stands for "devices". Contains file representations of peripheral devices.
  • /dev/null — also known as the "bit bucket" or "black hole", this pseudo device discards all contents written to it, and is typically used to pipe away unwanted data.
  • /dev/random — this pseudo device returns pseudorandom numbers (subject to the limitations of random number generators in computing) when read from. It uses system noise to generate random numbers and blocks if not enough entropy in the noise is available. Random is commonly used by programs such as SSH that absolutely need cryptographically-strong random data to generate an encryption key.
  • /dev/urandom — similar to /dev/random, except it always returns (less cryptographically-strong) pseudorandom numbers, even if there is not enough entropy in the system noise available.
  • /home — contains the home directories for the users.
  • /mnt — contains filesystem mount points.
  • /lib — contains system libraries.
  • /root — the home directory for the superuser root.
  • /tmp — a place for temporary files. Many Unices clear this directory upon start up.
  • /usr — originally the directory holding user home directories, its use has changed, and it now holds executables, libraries, and shared resources that are not system critical, like the X Window SystemKDEPerl, etc. (The name "Unix System Resources" is a post hoc backronym[citation needed].) However, on some Unix systems, some user accounts may still have a home directory that is a direct subdirectory of /usr, such as the default ast in Minix.
  • /usr/bin — this directory stores all binary programs distributed with the operating system not residing in /bin/sbin or (rarely) /etc.
  • /usr/include — /usr/include stores the development headers used throughout the system.
  • /usr/lib — the required libraries for executables within /usr or elsewhere for that matter, live here.
  • /usr/local — resembles /usr, except that 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.
  • /var — a short for "variable." A place for files that may change often.
  • /var/log — contains system log files.
  • /var/mail — the place where all the incoming mails are stored. The user can access his/her own mail only, unless he/she has admin rights.
  • /var/spool — spool directory; contains print jobs, mail spools and other queued tasks.
  • /var/tmp — A place for temporary files preserved between system reboots.

转载于:https://www.cnblogs.com/kelin1314/archive/2011/01/06/1929041.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值