I. Linux system architecture
Linux is a inverted tree structure, all the things in Linux are files, these files are in the system top Directory "/"/is the root directory
/directory Below is a level two directory these directories are automatically created when the system is installed
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M00/9C/26/wKiom1lssLOQIwInAAICj6neSzQ293.png-wh_500x0-wm_ 3-wmp_4-s_3185438283.png "title=" 00.png "alt=" Wkiom1lssloqiwinaaicj6neszq293.png-wh_50 "/>
The role of the secondary directory
/bin binary executable (i.e. system command)
/sbin System Management Command storage location
/boot boot partition, responsible for system boot
/dev Device Management files
/etc most system administration files
Home directory for normal users
/lib 32-bit system library file storage location
/LIB64 64-bit system library file storage location
/media System temporary Device mount point
/MNT System temporary Device mount point
/run System temporary Device mount point
/OPT third-party software installation location
/proc System Information
/root Super User home Directory
/srv,/var System Data
/sys system Management, mainly about the kernel
/tmp system temporary file storage location
/usr System user-related information data and user-defined software storage location
Two. Addressing the file
Absolute path
File in the real location of the system, the file name begins with "/"
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/9C/27/wKiom1lsunex3-TDAAAxMgSRi28456.png-wh_500x0-wm_ 3-wmp_4-s_573770677.png "title=" screenshot from 2017-07-17 20_50_12.png "alt=" Wkiom1lsunex3-tdaaaxmgsri28456.png-wh _50 "/>
Relative path
The file relative to the current location of the name of a shorthand, the name does not start with/, and the name will automatically add the value of the PWD display
Three. Management of documents
1.touch creating files or modifying file timestamps
Touch File Creation File
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/9C/27/wKiom1lsuobCKW7MAAAgtDDXyqs606.png-wh_500x0-wm_ 3-wmp_4-s_1952967113.png "title=" screenshot from 2017-07-17 20_52_23.png "alt=" Wkiom1lsuobckw7maaagtddxyqs606.png-wh_50 "/> 2.mkdir build Directory
mkdir Directory Creation
-P Parent Directory does not exist automatically established
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/9C/27/wKioL1lsupihAYkUAAAk4ZSwYV8592.png-wh_500x0-wm_ 3-wmp_4-s_407171403.png "title=" screenshot from 2017-07-17 21_01_34.png "alt=" Wkiol1lsupihaykuaaak4zswyv8592.png-wh _50 "/>3.rm Delete directory or text
Rm-f forcibly removed without prompting
-R Delete Directory
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/9C/27/wKioL1lsuqmTFs4GAAAxXUxvRho388.png-wh_500x0-wm_ 3-wmp_4-s_295833170.png "title=" screenshot from 2017-07-17 21_02_18.png "alt=" Wkiol1lsuqmtfs4gaaaxxuxvrho388.png-wh _50 "/>
4.cat|head|tail viewing the contents of a file
Cat View File Contents
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M02/9C/27/wKioL1lsuuzgIW1DAAAXlMce6w4401.png-wh_500x0-wm_ 3-wmp_4-s_2539098983.png "title=" screenshot from 2017-07-17 21_05_09.png "alt=" Wkiol1lsuuzgiw1daaaxlmce6w4401.png-wh_50 "/>
Head View file contents first 10 line parameter-n
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M01/9C/27/wKiom1lsuw2jhZIsAAAadhczxoo140.png-wh_500x0-wm_ 3-wmp_4-s_4101993609.png "title=" screenshot from 2017-07-17 21_06_42.png "alt=" Wkiom1lsuw2jhzisaaaadhczxoo140.png-wh_50 "/>
Tail View file contents First 10 line parameter-n
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M01/9C/27/wKioL1lsuxvTWbvYAAAdLnCo4cI799.png-wh_500x0-wm_ 3-wmp_4-s_3118721401.png "title=" screenshot from 2017-07-17 21_07_11.png "alt=" Wkiol1lsuxvtwbvyaaadlnco4ci799.png-wh_50 "/>
5.CD Switch Working directory
CD directory switch working directory to the specified directory
CD-Switch working directory to previous directory
CD ~ Switch to your home directory
CD ~usernmae switch to the specified user home directory
Cd.. Go to the parent directory of the current directory
Cd. Go to current directory
6.ls listing directory or file information
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M00/9C/27/wKiom1lsu1HCpaTtAAAzaaljMC0498.png-wh_500x0-wm_ 3-wmp_4-s_150395803.png "title=" screenshot from 2017-07-17 21_13_48.png "alt=" Wkiom1lsu1hcpattaaazaaljmc0498.png-wh _50 "/>
LS If there is no target behind then the default target is the current directory
LS direcory|filename list file or directory contents
ls-d direcotry List the directory itself
Ls-l Filename|dorectory lists the properties of the contents of a file or directory
Ls-ld directory lists the properties of the catalog itself
LS-A displays all content in the directory, including the "." Hidden files at the beginning
Ls-r to display content in a directory
7.CP file copy
CP is the process of creating a new file
CP file File1 file2. directory to copy file File1 file2 to Directory
CP file test establishes the test file template
Cp-r directorydirecotry1 Copy Directory
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/9C/27/wKiom1lsu2CikIH9AAAxKe0KqB0070.png-wh_500x0-wm_ 3-wmp_4-s_1578775.png "title=" screenshot from 2017-07-17 21_16_13.png "alt=" Wkiom1lsu2cikih9aaaxke0kqb0070.png-wh_ "/>8.MV Move or rename
The MV of the same disk is renamed, and the MV of different disks is the copy-delete process
MV file file1 direcotry move file file1 into directory
MV presence file does not exist file rename file
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/9C/27/wKioL1lsu3DRhMprAAAnX7A98_I627.png-wh_500x0-wm_ 3-wmp_4-s_1575949423.png "title=" screenshot from 2017-07-17 21_20_36.png "alt=" wkiol1lsu3drhmpraaanx7a98_ I627.png-wh_50 "/>
Four. Regular expressions
* Match 0 to any character
? Match a single character
[[: Alpha:]] matches a single letter
[[: Lower:]] matches a single lowercase letter
[[: Upper:]] matches a single uppercase letter
[[:d Igit:]] matches a single number
[[: Alnum:]] matches a single number or letter
[[:p UNCT:]] match a single symbol
[[: Space:]] match a single space
{} indicates a nonexistent or existing
{1..9} 1-9
{A.. F} a-f
{1,3,5} 135
{A,c,e} a C E
{1..3} {A.. C} 1a 2a 3a 2a 2b 2c 3a 3B3C
[] Indicates the existence of the
[A-c] AA BB CC
[a-c] AA or BB or C
[1-3] 1 or 2 or 3
[145] 1 or 4 or 5
[^abc]| [!ABC] except A and B and besides C
Learning task Heavy, seize the time to master!
Linux system architecture, file addressing, file-management editing, regular expressions