Linux operating system file action

file structure under linux, and see why each folder is using
/ bin binary executable command
/ dev device special file
/ etc system management and configuration files
configuration files and startup scripts /etc/rc.d
/ home user point home directory, such as the user's home directory user is / home / user, can be represented by ~ user
/ lib standard programming library, also known as dynamic link shared libraries, a role similar to windows .dll files in the
/ sbin system management command, here is the stored procedure management system administrators
/ tmp common temporary file storage point
/ root system administrator's home directory (Oh, the privileged class)
/ mnt system provides this directory is to enable users to temporarily mount other file systems.
/ lost + found This directory is usually empty, abnormal system shutdown while leaving the "homeless" file (.chk what is called under windows) here
proc virtual directory /, is the system memory map. You can directly access the directory to obtain system information.
/ var some overflow area large file, say a variety of services log file
/ usr largest directory, use the applications and files to almost all of this directory. Which includes:
/ usr / X11R6 store x window of the directory
/ usr / bin numerous applications
of some management program / usr / sbin superuser
/ usr / doc linux documentation
to develop and compile the application under / usr / include linux needed head File
/ usr / lib common dynamic link library and the package configuration file
/ usr / man help file
/ usr / src source code, linux kernel source code in / usr / src / linux in
/ usr / local / bin locally added command
/ usr / local / lib increase in local libraries

Typically, the root file system footprint in general be relatively small, because most of the documents do not need
frequent changes, but also strict file and a small file system do not change often is not easy to damage.
Except possibly one called / vmlinuz standard system boot image, generally does not contain any root file. All
other files in subdirectories in the root file system.

  1. / bin directory
    / bin directory contains the required boot command or a user ever used (possibly after booting). These
    commands are executable binary file (bin is binary - - short for binary), multi-system is an important system files.
  2. / sbin directory
    / sbin directory similar to / bin, is also used to store binary files. Because most of which are multi-file system administrator to make
    basic system program used, although it can be used when necessary and allow ordinary users, but generally do not give ordinary users.
  3. the / etc directory
    / etc directory for files with various system configurations, including the user information file / etc / passwd, the system initialization file
    member / etc / rc like. * These files linux It was able to run normally.
  4. / root directory
    / root directory is the root user's directory.
  5. / lib directory
    / lib directory of the program are shared libraries needed on the root filesystem, shared file storage root file system to run the required
    pieces. These files contain many programs can be shared code to avoid Each program contains the same sub-routine of
    this, it is possible to make the executable file smaller, saving space.
  6. / lib / modules directory
    / lib / modules loadable core system directory contains various modules, in particular those in the system to recover a corrupted reboot
    module guide system is required (e.g., network and file system driver).
  7. / dev directory
    / dev directory for a device file that the device drivers, user access to external devices through these files. For example, a
    user can access the mouse input by accessing / dev / mouse, just as access to other file.
  8. the / tmp directory
    The / tmp directory to store programs and data information generated at runtime. But after booting, running it is best to use
    / var / tmp instead of / tmp, since the former may have a larger disk space.
  9. / boot directory
    / boot directory storing a boot loader (bootstrap loader) file used, such as LILO, often the core image on here,
    rather than in the root directory. But if there are many kernel images, the directory can become large, then use a separate
    would be better file system. Another point to note is that, to ensure that the core image must be within the first 1024 cylinders ide hard drive.
  10. / mnt directory
    / mnt directory is the system administrator to install temporary mount point (mount) file system. The program does not automatically support the installation to
    / mnt. / mnt below it can be divided into a number of subdirectories, such as / mnt / dosa might be the floppy drive using the msdos file system,
    and / mnt / exta might be to use ext 2 file system floppy, / mnt / cdrom drive and so on.
  11. / proc, / usr, / var , / home directory
    mount point other file systems.

The following details;

/ etc file system
/ etc directory contains various system configuration files, some of which are described below. Other You should know that they belong to which
program, and read the man page for the program. Many network configuration files are in / etc.

  1. / etc / rc or /etc/rc.d or /etc/rc?.d
    start, or change the directory scripts or scripts that run when you run the class.
  2. / etc / passwd
    User database, which gives the user the domain name, real name, user's home directory, encrypted passwords and user of its
    other information.
  3. / etc / fdprm
    floppy disk parameter table to illustrate the different formats of the floppy disk. Available setfdprm set. For more information, see setfdprm
    help page.
  4. / etc / fstab
    list of file system when starting the need for automatic installation. Also includes information swapon -a enable the swap area.
  5. / etc / group
    similar to the / etc / passwd, but the information is not described, but the information the user group. It includes various data sets.
  6. / etc / inittab
    the init configuration file.
  7. / etc / issue
    includes user output information before the login prompt. Usually include a short description of the system or welcome information. In particular the
    content determined by the system administrator.
  8. / etc / Magic
    "File" configuration file. Description contains different file formats, "file" based on its guess file type.
  9. / etc / motd
    motd is abbreviated message of the day, the user logs in successfully automatically output. Content determined by the system administrator.
    Often used to announce information, such as warnings of planned shutdown time.
  10. / etc / mtab
    list of file systems currently installed. Initialized by the script (scritp), updated automatically by the mount command. When a need
    to use (e.g. df command) a list of currently mounted file system.
  11. / etc / shadow
    shadow password file on password software installed shadow (shadow) system. The shadow password file / etc / passwd
    encrypted password file is moved to the / etc / shadow, whereas the latter only for the superuser (root) readable. This makes decipher passwords more sleepy
    difficult, thus increasing the security of the system.
  12. /etc/login.defs
    the Login configuration file commands.
  13. / etc / printcap
    similar to the / etc / termcap, but for the printer. Different syntax.
  14. / etc / profile, / etc / csh. login, / etc / csh.cshrc
    login or startup files or c shells bourne when executed. This allows the system administrator to establish global default for all users environment.
  15. / etc / securetty
    confirm the safety terminal, which terminal that is allowed superuser (root) login. Generally only lists the virtual console, so as not
    possible (at least very difficult) via a modem (modem) or network to break into the system and get superuser privileges.
  16. / etc / shells
    listed shell may be used. chsh command allows the user to change the login shell in this document specified range. Providing a
    machine service process ftpd ftp service checking the user's shell is listed in / etc / shells file, if not, will not allow
    the promise of the user.
  17. / etc / termcap
    terminal capability database. DESCRIPTION different terminals what "escape sequences" control. Not directly output escaping when writing a program
    sequence (this can only work on a particular brand of terminal), but to find the correct sequence of work to be done from the / etc / termcap in.
    Thus, most of the program can be run on most terminal.

/ dev file system
/ dev directory contains device files for all devices. Device with a specific file naming conventions, which shows the list of devices.
Device file generated by the system when installed, can be used later / dev / makedev described. / Dev / makede v.local a
system administrator for the local device files (or connection) written description document (i.e., as some non-standard device driver is not a standard
part of makedev). Some common file Below is a brief introduction / dev.

  1. / dev / console
    system console, which is directly connected to the system monitor.
  2. / dev / HD
    IDE hard disk driver interface. Such as: / dev / hda refers to the first hard disk, had 1 refers to the first / dev / hda the
    partition. The other hard disk system, the order of / dev / hdb, / dev / hdc ,.;..... If there are a plurality of partitions were
    hda 1, hda 2... ...
  3. / dev / SD
    scsi disk driver interface. If the system has scsi hard disk, it will not access / dev / had, but will access the / dev / sda.
  4. / dev / fd
    floppy device drivers. Such as: / dev / fd 0 first floppy disk system, which is commonly referred to as a: plate,
    ...... / Dev /. 1 refers to second floppy disk FD, and / dev / fd 1 h 1 440 indicates an access to the drive in the 4.5 density disc.
  5. / dev / ST
    SCSI tape drive driver.
  6. / dev / tty
    provides virtual console support. Such as: / dev / tty 1 refers to the first virtual console system, / dev / tty 2 is the system
    of the second virtual console.
  7. / dev / pty
    provide remote access pseudo-terminal support. When making te lnet login is necessary to use / dev / pty devices.
  8. / dev / ttys
    computer serial port, it is to dos "com 1" port.
  9. / dev / cua
    computer serial interface for use with a modem device.
  10. / dev / null
    "black hole", all of the information written to this device will disappear. For example: When you want to output the information on the screen to hide
    when, as long as the input to the output / dev / null can be.

/ usr file system
/ usr is a very important directory, the file system is usually large, because all the programs installed here. / usr where
all the files from the general linux distro (distribution); locally installed programs and other stuff under / usr / local, as it can without having to reinstall the entire program when you upgrade or a new release of the new system. Many contents of the / usr directory is
optional, but these features make the user to use the system more efficient. / Usr can accommodate many large software packages and their configuration
files. Here are some important directories (some of the less important directories have been omitted) list.

  1. / usr / x11r6
    all executables contain x wi ndow system, configuration and support files. To simplify the development and installation of x,
    file x is not integrated into the system. x wi ndow system is a powerful graphical environment, provides a number of graphical
    utilities. If the user of microsoft wi ndows or machintosh more familiar with it, I would not have x wi ndow system feel helpless.
  2. / usr / x386
    similar / usr / x 11r6, but is dedicated to the x 11 release 5.
  3. / usr / bin
    focused almost all user commands, the system software libraries. Some other commands in / bin or / usr / local / bin in.
  4. / usr / sbin
    contains the root file system unnecessary system management commands, such as most of the service program.
  5. / usr / man, / usr / info, / usr / doc
    The directory contains all the manual pages, gnu information documents and various other document files. "Festival" each online manual
    has two subdirectories. For example: / usr / man / man manual page 1 contains a first source code (not the original text formatted
    member), / usr / man / cat 1 contains the first formatted content. l online manual is divided into nine sections: internal commands, system calls
    used, library functions, device, file format, games, macro package, system management and core processes.
  6. / usr / include
    contains c language header files, these files to multiple end. H, c language used to describe the data structures used in program,
    sub-processes, and constants. For consistency, this should actually be placed in the / usr / lib, but the habit has been used for the name of the
    word.
  7. / usr / lib
    contains the same data file or a program subsystem, including a number of site - wide profile. Name lib comes from library
    (library); original programming library there / usr / lib Lane. When compiling the program, and the program will be one of the libraries to connect. Also
    there are many programs to the configuration file into it.
  8. / usr / local
    locally installed software and other files placed here. This is similar to / usr. Users may find some relatively large in this
    package, such as tex, emacs and so on.

the / var filesystem
/ var system generally comprises a runtime data to be changed. The size of the directory is usually where these data are constantly changing to
or expanded. The original / var directory of some of the content is in / usr, but in order to maintain the relative stability of the / usr directory, put away
those needs often change into the directory / var in the. It is specific for each system, i.e., not shared with other computers via a network.
Here are some important directories (some of the less important directories omitted).

  1. / var / catman
    including formatted help (man) page. Help page source files are generally present / usr / man / man; the man some pages
    may have a pre-formatted version, there is / usr / man / cat in. While the other man pages need to be formatted for the first time to see,
    formatting complete version exists / var / man in so that others will not have to wait to look the same when formatting the page.
    (/ var / catman is often clear, as clear as the temporary directory.)
  2. / var / lib
    file storage system during normal operation to be changed.
  3. / var / local
    storage / usr / local program installed in the variable data (i.e., the system administrator to install a program). Note that, if necessary,
    even locally installed programs should use the other / var directory, such as / var / lock.
  4. / var / lock
    lock file. Many programs follow a lock file in / var / lock in the agreement, they are to be used to support the
    use of a particular device or file. Other programs will notice the lock file, you will not use the device or file
    parts.
  5. / var / log
    log various programs (log) files, especially login (/ var / log / wtmp log records all login to the system and note
    the pin) and syslog (/ var / log / messages record and store all core systems program information). / var / log files are often not in
    determining growth, should be regularly cleared.
  6. / var / run
    saved next valid information about the file system before the system boot. For example, / var / run / utmp board comprising a current
    user information recorded.
  7. / var / spool
    disposed "spool (spool)" program directory, such as mail, news, printer queues, and other work queues. Each
    different spool has its own subdirectory in / var / spool, for example, the user's mailbox will be stored in / var / spool / mail in.
  8. / var / tmp
    ratio allowed for / tmp or more temporary files that require relatively long time.
    Note that the system administrator might not allow / var / tmp has a very old one.

/ proc filesystem
/ proc file system is a pseudo file system, that it is actually a directory that does not exist, so this is a
very special directory. It does not exist on a disk, but by the kernel in memory. This directory is used to mention
providing information about the system. The following describes some of the most important files and directories (/ proc file system in more detail in proc man page
fine description).

  1. / proc / x
    information about directory of the process of x, x is the identification number of the process. Each process has a self-titled under / proc
    directory has a process ID.
  2. / proc / cpuinfo
    storing information processor (cpu), as cpu type, manufacturer, model, and performance.
  3. / proc / devices
    List of device drivers configured into the kernel currently running.
  4. / proc / dma
    display dma channel currently in use.
  5. / proc / filesystems
    kernel configuration file system information.
  6. / proc / interrupts
    display interrupt information and information occupants are occupied, and the number is occupied.
  7. / proc / ioports
    currently used i / o ports.
  8. / proc / kcore
    system physical memory image. Exactly the same as the physical memory size, but in fact did not take up so much memory; it is only
    just to access the program when it was created. (Note: unless you copy it to any place, otherwise there is no under / proc any
    thing take up any disk space.)
  9. / proc / kmsg
    message core output. It would be sent to syslog.
  10. / proc / ksyms
    core symbol table.
  11. / proc / loadavg
    system "load average"; 3 no sense indicator indicates the current system workload.
  12. / proc / meminfo
    various memory usage information, including the physical memory and swap (swap).
  13. / proc / modules
    to store what is currently loaded kernel module information.
  14. / proc / net
    network protocol state information.
  15. / proc / self
    storage to view / sign proc process directory of the program connection. When the two processes View / proc, this will be a different
    connection. This is mainly to facilitate the program gets its own process directory.
  16. / proc / stat
    different states of the system, for example, the number of errors occurred after system startup page.
  17. / proc / uptime
    length of the system startup time.
  18. / proc / version
    kernel version.

Guess you like

Origin www.cnblogs.com/i969639/p/11200887.html