Description of the directories in the file system:
/boot: System boot related files, such as kernel, INITRD, and Grub (bootloader)
/dev: Device files
Device files:
Block devices: Random access, data blocks, and so-called order, such as silver plate
Character Devices: Linear access, in characters, sequentially input/read one by one, such as keyboard, mouse, monitor
Device number: Main device number (major) and secondary device number (minor)
/etc: Configuration file
Home directory for users, the home directory of each user defaults to/home/username
/root: Administrator's home directory
/lib: library file, cannot be executed individually, smart is called
Static Library:. A is directly linked to the program and becomes part of the program by static compilation
Dynamic library:. So (Shared object) uses the time to load the dynamic library into memory for common use.
/lib/modules: Kernel module files
/media: mount point directory, mobile device, such as U-disk, CD-ROM, etc.
/MNT: mount point directory, additional temporary file system, such as a second hard drive
/OPT: The installation directory of third-party software, usually some optional software, all the data of the software is placed in this directory, to remove the software can be directly RM-RF
/PORC: Pseudo file system, kernel mapping file, kernel attribute function mapping, composing file
/sys: Pseudo file system, property mapping file related to hardware device
/tmp: Temp file,/var/tmp
/var: a variable file
/bin: Executable file, user command
/sbin: Managing Commands
/usr:universal shared Read-only System-level directory, equivalent to C:\windows in Windows
/usr/bin
/usr/sbin
/usr/lib
/usr/local: The installation directory of third-party software, usually some manually installed software, user-compiled software is automatically installed in this file system by default
/usr/local/bin
/usr/local/sbin
/usr/local/lib
File naming rules:
Length cannot exceed 255 characters
The file name cannot contain/characters
Strictly case-sensitive
Relative path: Find the path to a specific file as a starting point for your working directory
Absolute path: Find the path to the feature file from the root directory
Directory Management:
1. The previously mentioned LS CD pwd
2.mkdir: Create a new directory
-P: Overlay Create Directory
-v:verbose, displaying details after creating a directory
Pay special attention to the use of the {} symbol
MKDIR-PV/MNT/TEST/{X/A,B}
Created two directories for/mnt/test/x/a and/mnt/test/b
3.tree: Viewing the directory tree
Format: Tree Directory
4.rmdir: Delete Empty directory
-P (parents): Delete with parent directory, i.e. overlay Delete empty directory
5.install-d Directory: Creating directories
6.rm-r: Recursively Delete a directory
File Management:
1.touch: Create a file or change the timestamp of the file
-A: Modify access time
-M: Modify Modify Time
-T YYYYMMDDHHMMSS: Specify both access time and modify
-C: Do not create a new file
2.stat: View detailed information about a file or file system
Format: Stat file/directory
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/C7/wKioL1WobxHBQ5MAAADrStEeqJU091.jpg "title=" touch- T "alt=" wkiol1wobxhbq5maaadrsteeqju091.jpg "/>
3.file: View the encoding type of the file
Format: File files
Coding Standard: Ascii,gb18030,gbk,gb2312,unicode
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/C7/wKioL1WocM_ClO00AAAczm3Ar54250.jpg "title=" file " alt= "Wkiol1wocm_clo00aaaczm3ar54250.jpg"/>
4.RM: Delete Files
-I: Display prompt information
-F: Forced deletion, different hints
-r: Recursively delete directory
To ensure that files are not deleted by mistake, the system has an RM alias of Rm-i
5.CP: Copying and moving files
Format: CP src dest
-R: Recursive replication, copy the contents of the source directory to the directory
-i:interactive, prompt before copying
-f:force, do not prompt when copying
-P: Preserve original properties for replication
-D: Copy the linked file, by default CP cannot copy the linked file directly
-A: Equivalent to-DRP, archive replication, often used for backup, does not change the properties of the file
CP Usage Rules:
When more than one parameter is present, the last parameter is dest, and the previous one is SRC
Directory must exist when dest is a directory
CP can only copy one file to a file
n Files +n directories to a directory
6.MV: Move files, can also be used to rename files and directories
Format: MV Src dest
-T dest SRC: For moving multiple source files into a directory
7.install: Copy files or set file permissions
-D directory: Creating directories
src dest: Copy files, permissions are modified by default to Rwxr-xr-x
-M xxxxxxxxx sre dest: Copy files and specify permissions for files
-T dest SRC: For copying multiple source files into a directory
Linux Learning Notes < Two >--linux root file system and file directory management