bin

advertisement
Generic Unix Directory Structure
/dsk
/pts
/bin
/rdsk
/rmt
/
Root Dir
/dev
/term
/auth
/etc
/default
/init.d
/sbin
/rc0.d
/rc2.d
/home
/rc3.d
/lost+found
Y. K. Chang
/skel
Unix Systems Administration
1
Generic Unix Directory Structure
/mnt
/proc
/
Root Dir
/tcb
/tmp
/usr
/bin
/games
/include
/lib
/bin
/sbin
/man
/ucb
/cron
/local
/sharee
/adm
/mail
/var
/news
/stand
/preserve
/tmp
Y. K. Chang
/X11
/cron
/lock
/lp
/netlb
/mail
/opt
/mqueue
/spool
/uucp
/yp
/uucppublic
Unix Systems Administration
2
Generic Unix Directory Structure
 /:
– Base of the filesystem’s tree structure
 /bin:
– traditional location for executables.
– Some systems: some files in /bin are symbolic
links to files in /usr/bin, or /bin is a symbolic
link to /usr/bin.
– Others holding executables include /usr/ucb
Y. K. Chang
Unix Systems Administration
3
Generic Unix Directory Structure
 /dev
– contains device related special files.
– Divided into subdir based on System V
•
•
•
•
dsk and rdsk for disks accessed in block and raw mode.
mt and rmt for tapes
pts and ptc for pseudo-teminals
term for terminal (serial line)
– BSD-ish UNIX has a flat /dev
– Solaris introduces /devices and files in /dev are symbolic
links to ones in /devices
Y. K. Chang
Unix Systems Administration
4
Generic Unix Directory Structure
 /etc
– system configuration files such as administration
file and boot scripts.
– Traditionally, it contains executables for
administrative commands, now in /usr/sbin and
/sbin.
 /sbin: system executables
 /home
– conventional location for users’ home.
– Or /users
Y. K. Chang
Unix Systems Administration
5
Generic Unix Directory Structure
 /lost+found
– lost files referred to disk locations that are marked as in
use in the data structure on the disk, but that are not
listed in any directory.
– Caused by incorrect system shutdown or disk errors.
– Every partition has one lost+found dir.
 /mnt
– Tempory mount directory: an empty directory designed
for temporarily mouting filesystems.
Y. K. Chang
Unix Systems Administration
6
Generic Unix Directory Structure
 /proc
– active processes’s images, designed to enable
processes to be manipulated using Unix file
accessing system calls
 /tcb (trusted computing base)
– security-related database files
– SCO Unix, HP-UX 10 and Digital Unix.
– Configuration files related /tcb in /etc/auth
Y. K. Chang
Unix Systems Administration
7
Generic Unix Directory Structure
 /tmp
– used as a scratch directory
– cleaned regularly, normally one of the startup
scripts will clean /tmp.
 /var
– spooling (/var/spool) and other volatile dir
– e.g. uucp, printer, mail, and cron
– some systems contain /var/opt for optional
software products
Y. K. Chang
Unix Systems Administration
8
Generic Unix Directory Structure
 /stand
– V.4-designated for kernel image in HP-UX 10. Solaris
has a similar dir /kernel.
 /usr
– contains subdir for locally generated programs,
executables for user and administrative commands,
shared libraries, other part
– /usr/adm contains Unix accounting files and various
logging files or recently linked to /var/adm
Y. K. Chang
Unix Systems Administration
9
Generic Unix Directory Structure
 /usr (cont.)
– /usr/bin contains binary files and shell scripts,
public executables such X11
– /usr/games contains standard games, usually
removed by system adm
– /usr/include contains C header files.
/usr/include/system has OS includes files.
– /usr/lib has public library files (C lib for math
and I/O in libx.a)
Y. K. Chang
Unix Systems Administration
10
Generic Unix Directory Structure
– /usr/local has local files, /usr/local/bin has nonvendor-supplied executables.
– /user/share has shared data, such as online manual
pages, font directories, files for spell
– /usr/ucb has standard Unix commands origianlly
developed under BSD.
• Under IRIX, it is linked to /usr/bsd
– /usr/share/man is one location for manual pages.
• Traditionally, subdir mann has raw pages and catn has
formatted versions of troff or nroff.
Y. K. Chang
Unix Systems Administration
11
Generic Unix Directory Structure
 /usr (cont.)
• IRIX follows an older variant, using
/usr/share/catman which has several subdir: a_man,
g_man, p_man, and u_man for administrative,
graphics, programming, and user manual pages.
• Or /usr/man
Y. K. Chang
Unix Systems Administration
12
Download