Watch [the best linux video tutorial in history] Sort notes and keep updating ......, Linux
1 // File Processing Command 2 Command Format: Command [-parameter] [parameter] 3 examples: ls-la/etc 4-a equals -- all 5 6 // directory processing command: ls 7: path of list 8:/bin/ls 9 Syntax: ls option [-ald] [file or directory] // display file 10-a show all files, including the hidden file 11-l detailed information display 12-d view directory properties 13-h show the original file size unit 14 15 // file type 16-rw-r -- 17- rw-r -- 18 file type u g o 19 owner group others 20 r: read w: Write x: Execute 21-: binary file 22 d: Directory 23 l: Soft link file 24 25 // directory processing command: mkdir 26: path of make directories 27:/bin/mkdir 28 Syntax: mkdir-p [directory Name] // Create File 29-p recursively create 30 31 // directory processing command: cd 32 original definition: change directory 33 path: shell built-in command 34 Syntax: cd [Directory] // switch path 35 36 pwd: view the current actual path 37 cd ..: Enter the current parent directory 38 39 // File Processing Command: rmdir 40 original definition: remove empty directories 41 path:/bin/rmdir 42 Syntax: rmdir [directory name] // you can only delete an empty directory 43 44 // directory processing command: cp 45 Original Definition: copy 46 path:/bin/cp 47 Syntax: cp-rp [original file or directory] [target directory] // copy Copy copy 48-r copy directory 49-p keep file attributes 50 51 // directory processing command: mv 52 Original Definition: move 53 path:/bin/mv 54 Syntax: mv [original file or directory] [target directory] // cut file, rename 55 56 clear: clear screen 57 58 // directory processing command: rm 59: path of remove 60:/bin/rm 61 Syntax: rm-rf [file or directory] // delete file 62-r Delete directory 63-f force execute 64 65 // File Processing Command: path of touch 66: /bin/touch 67 Syntax: touch [file name] // create an empty file 68 69 // File Processing Command: cat 70 path:/bin/cat 71 Syntax: cat-n [file name] // display file content 72-n display line number 73 74 // File Processing Command: tac 75 path:/user/bin/tac 76 Syntax: tac [file name] // display file content (reverse display) 77 78 // File Processing Command: more 79 path:/bin/more 80 Syntax: more [file name] // display the file content by page 81 (Space) or f flip 82 (Enter) wrap 83 q or Q exit 84 85 // file processing command: path of less 86:/user/bin/less 87 Syntax: less [file name] // display the file content by PAGE (turning up) 88/keywords: // search for 89 90 in the file // File Processing Command: path of head 91:/user/bin/head 92 Syntax: head [file name] // display the first few lines of the file (10 lines of data are displayed by default) 93-n specify the number of lines 94 95 // File Processing Command: path of tail 96: /user/bin/tail 97 Syntax: tail [file name] // display the following lines of the file 98-n specify the number of lines 99-f dynamic display of the content at the end of the file // view the log file 100 101 // File Processing Command: ln102 Path:/bin/ln104 Syntax: ln-s [original file] [target file] // generate link file 105-s create soft link 106 107 soft link: similar to windows shortcut 108 hard link: the original file is consistent with the new file (synchronously updated). It is identified by the I node and cannot be cross-partition. The 109 110 permission management command cannot be used for the directory: chmod111: change the permissions mode of a file112 path:/bin/chmod113 Syntax: chmod [{ugoa} {+-=}{ rwx}] [file or directory] [mode = 421] [file or directory] // change file or directory permissions 114-R Recursion modify the 115 permission number to indicate: 116 r --- 4 read permission can view file content can list contents in the directory 117 --- 2 Write Permission can modify the file content can be created and deleted in the directory 118 x --- 1 execution right Restricted executable files can be accessed to the directory 119 120 // permission management command: chown -- only root can change 121 English original intention: change file ownership122 path:/bin/chown123 Syntax: chown [user] [file or directory] // change the owner of a file or directory 124 125 // permission management command: chkg126 path of change file group ownership127: /bin/chkg128 Syntax: chgrp [user group] [file or directory] // change the group to which the file or directory belongs 129 to view the permission to create a file; umask-S 131 --> 0022132 --> stands for permission (755) rwxr-xr-x133 modify umask default permission: umask 023134 135 // file search command: find136: /bin/find138 Syntax: Find [search range] [match condition] // file search 139 find/-name init // exact search 140 * init * // fuzzy search 141 init ??? // Starts with init and is followed by three characters including 142-iname init ??? // Same as above, and Case Insensitive: 143 144-size + n // more than n file examples: + 204800 (Files larger than MB) 145-n // file smaller than n: 146 n // file equal to n: 147 148-group // search for example from the group: -user149 150-amin // access time example:-cmin-5 (attribute files and directories modified in five minutes) 151-cmin // File Attribute change152-mmin // file content modify153 154 find/etc-size + 163840-a-size-204800 // search for a value greater than 80 m and less than m in/etc file 155-a meets both conditions (and) 156-o: either of the two conditions can be met (or) 157-type search by file type (f file, d directory, l soft link file) 158-inum search 159 find/etc-inum 31531-exec rm {} \ Based on the I node; // find a file and execute the delete operation 160 161 // file search command: locate162 path:/user/bin/locate163 Syntax: locate file name // search for files in the file database 164 update database: updatdb165 166 // command search: which167 path: /user/bin/which168 Syntax: which command // SEARCH command directory and alias information 169 170 // file search command: grep171 path:/bin/grep172 Syntax: grep-iv [specified string] [file] // search for String Matching lines in the file and output 173-I case insensitive 174-v exclude specified string 175 176 // HELP command: man177: manual178 path:/user/bin/man179 Syntax: man [command or configuration file] // get help information 180 man ls // view help information of ls command 181 man services // view help information of configuration file services 182 whatis ls/ /view ls command explanation 184 ls -- help // view ls option 185 info186 187 // help command: help188 path: Shell built-in command 189 Syntax: help Command // get help information of Shell built-in command 190 help umask // view help information of umask command 191 192 193 194 195 196 197 198