First, Shell terminal initial
Shortcut keys CTRL + ALT + T, you can quickly open the terminal
Bluemoutain Current user name bluemoutain-cn155 native name ~ current directory (home directory, root user is/root, normal user is/home/bluemoutain
Second, the command format
command "Options" "Parameters" Note: 1 , individual command use does not follow this format 2, when there are multiple options, you can write together
Iii. Types of files
-rw-r--r--First "-": Indicates the file type (-file type D directory l soft link file) rw- r-- r--u owner G belongs to group O others R Read W write x Execute
Iv. Query Command--ls
ls [option "File or directory" option :-A displays all files, including hidden files -l Show Details -D View Directory properties -H humanized display file size -I display inode
V. Establishment of the catalogue
mkdir "File name" mkdir -p filename/file name #递归创建
Vi. the directory in which to switch
CD [catalogue] ~CD -Go to the last catalog CD . Go to Parent directory
Vii. displaying the current path
Pwd
Viii. Deleting a table of contents
rmdir [directory name] English original meaning: remove empty directoriesRM -RF [file or directory] English intent: Remove option :-R Delete directory -F Mandatory
Nine, copy
CP [ Options] [original file or directory] [target directory] English original: Copy option: -R Copy directory -p Joint File property copy -D If the source file is a linked file, copy the link property-a equivalent to-RPD, if you need to replicate exactly the same, use the-a option
Ten, cut or renamed
MV [Original file or directory] [target directory] English original meaning: moveps: The same directory is renamed Operation
Xi. the role of common Linux directories
First look at what the root directory has:
1, the root directory of the bin and the SBIN,USR directory under the bin and Sbin, these four directories are used to save the system command.
Only the commands in the Sbin directory can be run by the root user.
2. Boot: Startup directory
3. Dev: Special File save directory (Hardware)
4, ETC: System configuration file directory
5, Lib: function library file directory, write commands as functions, reduce the volume of Linux system
6. Media mnt misc Three empty directories to mount external storage devices
7, Pros SYS is the memory mount point, cannot write the data inside
8. tmp Temp Data Directory
12. Link command
1. Format:
LN [Original file] [target file] command English original: Link function Description: Generate Link File options: -S Create soft links
2. The difference between hard links and soft links:
Hard links and original files are identical, delete the original files can still be used.
Soft link is to record the original file inode and name, by querying the original file for use, delete source files can not be used.
3. Hard link Feature
(1) has the same inode and storage block blocks, can be seen as the same file
(2) can be identified by inode
(3) cannot cross partition
(4) cannot be used for directory
4. Soft Link Features
(1) Similar to Windows shortcuts
(2) The soft link has its own inode and block blocks, but only the file name and inode number of the source file is saved in the data block, and there is no actual file data
(3) lrwxrwxrwx L Soft Link
Soft link permissions are rwxrwxrwx, but the actual access rights are determined by the original file.
(4) Modify any file, the other changes
(5) Delete source file, soft connection cannot be used.
Linux Talent Formation Program study notes (i)--command basic format and file processing commands