First, the Linux directory system
1./root directory, the general root directory only the directory, do not store files.
2./bin;/usr/bin binary executable file directory, green display of files, such as LS, CAT,TAR,MV
3./sbin;/usr/sbin Super User can perform file storage, Super=root
4./etc/Store Most of the configuration files, do not recommend to store executable files, important profiles/etc/inittab,/etc/fstab,/ETC/INIT.D,/etc/x11 (x Windows desktop Configuration),/etc/sysconfig,/ ETC/XINETD.D, it's a good idea to make a backup before modifying these profiles
/ETC/RC,/ETC/RC.D,/ETC/RC*.D: The directory of scripts running when the run level starts
/ETC/PASSWD user database, where domain gives user name, real name, home directory, encrypted password
/etc/group User Group Information
/etc/inittab storing the init configuration file
/etc/shadow Shadow password file, but only root user readable
/etc/sysconfig Network configuration file storage directory
5./boot includes the file storage directory used by the kernel and other system startup,/boot/vmlinuz kernel files for Linux, and/boot/grub recommended separate partitions, 100M
6./usr/includes file and directory storage points that are directly related to system users, such as applications and library files that support them
7./home/username General user's home directory, ~ represents the current user's home directory, ~test represents the test user's home directory, it is recommended to separate large disk space, convenient for users to save data
/root is the root user's home directory
8./lib repository file, stored in/bin;/sbin the executable program depends on the library file
LDD/BIN/LS Displays the library file to which the executable file LS depends
9./tmp Temporary file directory, give all system users read and write permissions, important data can not be placed in this directory
C:\windows\temp in window is the temp file directory
/media CD-ROM drive file;
/mnt The directory usually holds the mount point of the file system mounted after the system boots, the default CD mount point/mnt/dcrom/;
/OPT is the default empty file, oracal file directory, to the host to install additional software files directory, such as self-installing the KDE desktop, the software installed in the directory
/proc System kernel Mapping file directory, virtual out, no actual storage files, process and kernel-related information, directory of data are stored in memory, no disk space, important files: system core, external devices, network status,
/proc/cpuinfo Native CPU-related information, time pulse, type, and arithmetic functions ;
The IRQ assignment state of the/proc/interrupts system;
/proc/kcore memory size;
/proc/ioports the I/O address configured on the system above the device;
/proc/net/*; network device files
Ls-l/proc
Echo 1 >
/srv and/proc are virtual mapped directories, virtual file systems
used to mount the initrd.img The directory of the image file and the directory in which the required device modules are loaded.
do not delete /initrd/ the directory. If you delete the directory and then reboot Red Hat Linux, you will not be able to boot your computer
*/var storage (variable) constantly changing file directory, log (/var/log,/var/log/message), Mail (/var/pool/mail), program or service startup, its PID stored in the/var/run directory
/lost+fount: When the system is abnormal, some missing fragments will be stored in the directory.
Ii. Types of Linux files
File type:
Normal file: Plain text file (ASCII); binary file ( binary ), the first property [-]
Table of Contents (directory), first attribute [d]
Link, like a shortcut in Windows, the first property [L]
Device files, some files related to the perimeter of the system, usually in the/dev directory, are usually divided into two types:
Block device: A device that stores data to provide system access, simply a hard disk, such as the first hard drive/dev/hda1 first property [d]
Character device (character): Some serial port interface device, keyboard, mouse, etc.; the first property is [C]
Third, the meaning and function of Inode in Linux file system
Linux file System (inode)
Each file: File data content (block) + file attributes (Inode)
When each disk partition formatted (format) is ext2, you must specify the size of the Inode table and block area of two regions.
Block is the smallest unit of data storage
The inode is the attribute of the stored file and the file content point (pointer) (the point of the content in the disk block domain)
inode contains attributes: File owner and owning group; File access mode, file type, file settling time (CTime), last read time (atime), Last modified time (mtime), file capacity, size, permission flag (flag), file content point (pointer)
This article is from the "Jasonzhu Technology Home" blog, please make sure to keep this source http://jasonzhu.blog.51cto.com/5594807/1633864
Linux file system