Linux directory tree

xiaoxiao2021-03-06  104

Speaker: Skylove directory tree can be divided into a small portion, each of which can be on your own disk or partition. The main part is root, / usr, / var, and / home file system. Each section has a different purpose. Each machine has a root file system, which contains the system boot and enables files necessary for Mount to Mount, and the root file system should have enough content necessary for single user status. It should also include tools to repair damaged systems, recover backups, and the like. The / USR file system contains all commands, libraries, man pages, and other unlilled files required in general operations. / USR should not have files to be modified in general use. This allows the files in this file system to share through the network, which can be more effective, because this saving disk space (/ usr is easy to be hundreds of trill), and is easy to manage (when upgrading the application, only the master / usr needs to change, There is no need to change each machine) Even if this file system is on this site, you can read only Mount to reduce the damage of the file system when the system crashes. / VAR file system contains files that will be changed, such as spool directory (Mail, News, printer, etc.), log files, formatted manual pages, and temporary files. Traditionally / var's all things have been in / usr, but such / usr cannot be read-only. The / Home file system contains all actual data on the system. A large / home may be divided into a number of file systems, need to add first level name, such as / home / students, / home / staff, etc. Although different parts are called different parts as a file system, they don't have to be a real separated file system. If the system is a small single user system, and the user wants to simplify, it can be easily placed in a file system. The directory tree can also be divided into different file systems depending on the space required for disk capacity and different purposes. It is important to use standard names, even on / var and / usr on the same partition, name /usr/lib/libc.a and / var / us must work, such as moving files under / VAR to / us / var and the / var as a symbolic connection of / usr / var. The UNIX file structure is packet files based on the purpose, that is, all the commands in one place, all the data in another place, all documents are in one place, and so on. Another method is based on a program packet file, that is, all Emacs files in a directory, all TEX files in another, and so on. The problem of the latter method is that the document is difficult to share (the program directory often contains static and dynamic unsocvisible files), sometimes it is difficult to find (such as the MAN page in a large number of places, making the Man program to find them extremely difficult) . The root file system root file system should generally be relatively small, because it is not easy to damage the strict file and a small unusible file system. Damaged root file systems generally means that unless a specific method (eg, slave floppy disk) system cannot be guided. The root directory generally does not contain any files, in addition to possible standard system boot images, usually called / Vmlinuz. All other files are in the subdirectory of the root file system. / bin boots commands that the required commands or ordinary users may be used (possibly after boot startup). / sbin is similar / bin, but does not use ordinary users, although it can be used if necessary and allowed. / ETC specific machine configuration file. / Root root user's home directory. The shared library required for the program on the lib root file system. / lib / modules core loadable module, especially those required to boot when the damage is reduced (such as network, and file system driver). / DEV device file. / TMP temporary file. The program that is boot started should use / var / tmp, not / TMP, because the former may be on a disk with more space.

/ boot Booter Loader (Bootstrap Loader), such as LILO. The core image is often here, not at the root directory. If there are many core pictures, this directory may become large, then you may use a separate file system better. Another reason is to ensure that the core image must be in the top 1024 cylinders of the IDE hard drive. / MNT system administrator temporary MOUNT installation point. The program does not automatically support installation to / mnt. / MNT can be divided into a subdirectory (such as / MNT / DOSA may be a floppy drive using the MSDOS file system, and / MNT / EXTA may be a floppy drive using an EXT2 file system). / Proc, / usr, / var, / home Other file system installation points. The / etc directory / etc directory contains a lot of files. Many network configuration files are also in / etc. / etc / rc or /etc/rc.d or /etc/rc*.d is started, or change the scripts or scripts of the Scripts or Scripts running when the run level is changed. / etc / passwd user database, where the domain gives the username, real name, home directory, encrypted password, and other information. / etc / fdprm floppy disk parameter table. Note Different floppy disk formats. Set with SetFDPRM. / etc / fstab starts Mount -a commands (in / etc / rc or equivalent boot file) Automatic Mount file system list. Under Linux, information is also included in the SWAP area enabled with swapon -a. / etc / group is similar / etc / passwd, but instructions are not users but groups. / etc / inittab init configuration file. / etc / issu getty output information before the login prompt. It usually includes a short description or welcome information of the system. The content is determined by the system administrator. / etc / magic file configuration file. Instructions containing different file formats, FILE is based on it guess file type. / etc / motd message of the day, automatically outputs after successful login. The content is determined by the system administrator. Frequently used for advertisement information, such as a warning of the shutdown time. / etc / mtab currently installed file system list. Initialized by Scripts and automatically update by the mount command. Requires a list of currently installed file systems, such as DF commands. / etc / shadow on the system on the system of shadow password software on the system. The shadow password file moves the encryption port in the / etc / passwd file to / etc / shadow, while the latter is only read to root. This makes the decipherous password more difficult. The /etc/login.defs login command configuration file. / etc / printcap is similar / etc / termcap, but for printers. The grammar is different. / etc / profile, /etc/csh.login, /etc/csh.cshrc login or started the file that Bourne or c shells executed. This allows the system administrator to establish a global default environment for all users. / etc / securetty confirms the security terminal, which terminal allows root to log in. Generally, only virtual console is usually listed, so it is impossible (at least very difficult) intrusion into the system through the MODEM or network, and get superuser privileges. / etc / shells lists trusted shells. The chsh command allows the user to change the login shell within the specified range of this document. Providing a machine FTP service service process FTPD checks if the user shell is listed in the / etc / shells file, if it is not allowed to log in. / etc / termcap terminal performance database. Explain what "escape sequence" control is used by different terminals. When writing programs, the escape sequence is not directly output (which can only work in a particular brand of terminals), but lookup the correct sequence of the work you want to do from / etc / termcap. In this way, most programs can run on most terminals. The / dev directory / dev directory includes device files for all devices. Device file is named with a specific agreement.

/ USR file system / usr file system is often large because all programs are installed here. All files in usr generally come from Linux Distribution; locally installed programs and other things under / usr / local. This may not need to reinstall all programs when upgrading a new system or new Distribution. / usr / x11r6 x window system all files. To simplify the development and installation of X, the X files are not integrated into the system. X yourself like / usr under / usr / x11r6. / USR / X386 similar / usr / x11r6, but gives X11 Release 5. / usr / bin almost all user commands. Some commands are in / bin or / usr / local / bin. / USR / SBIN root file system unnecessary system management commands, such as most service programs. / USR / MAN, / USR / INFO, / USR / DOC man page, GNU information documentation, and various other document files. / usr / include C programming language header file. In order to consistency this, this is actually under / usr / lib, but it is traditionally supported this name. / USR / LIB program or subsystem constant data file, including some Site-Wide configuration files. Name lib comes from library; programmed raw stock in / usr / lib. / USR / LOCAL installs software and other files are placed here. / VAR file system / var includes data to be changed at general time of system. Each system is specific, that is, not shared with other computers over the network. / var / catman When the cache of the Man page is required to format it. The source file of the Man page generally exists / usr / man / man *; some MAN pages may have pre-formatted versions, exist / usr / man / cat *. Other MAN pages need to format, the formatted version of the version exists / var / man, so others do not wait to format the same page. (/ VAR / CATMAN is often cleared, just like clearing the temporary directory.) / VAR / lib system runs normally to change the file. The variable data of the program installed in / var / local / usr / local (ie, the system administrator installed). Note that if necessary, even if the program is installed, other / var directories, such as / var / lock. / VAR / LOCK lock file. Many programs follow the conventions of a locked file in / var / lock to support them being using a particular device or file. Other programs notice this lock file, will not try to use this device or file. / VAR / log file log file, especially login (/ var / log / wtmp log all to system login and logging) and Syslog (/ var / log / messages store all core and system program information. / var The files in / log are often uncertain, and should be cleared regularly. / var / run saves valid for the next guidance. For information on the system. For example, / var / run / utmp contains information of the currently logged in. / VAR / Spool Mail, News, Print Queues and Other Queenters Work. Each Different Spool has its own subdirectory under / var / spool, for example, the user's mailbox is in / var / spool / mail. / VAR / TMP ratio / TMP allows for a long period of time. (Although the system administrator may not allow / var / TMP to have an old file.) / Proc File System / Proc File System is a fake file system It does not exist on a disk in a disk. It is generated by the core in memory. It is used to provide information about the system (Originally About Processes, Hence the Name). Some of the most important files and directories. / Proc / 1 About the information directory of the process 1. Each process has a directory named its process number under / proc.

转载请注明原文地址:https://www.9cbs.com/read-123968.html

New Post(0)