1,alias alias simplifies the input of complex commands alias myls= ' LS-LH ' #定义别名 unalias myls #删除别名2, wildcard: *: Any number of any character?: Single character [A-z]: one in multiple characters or contiguous range, omitted if none {A,min , XY}: Multiple sets of different strings, full match example: Please list/dev/tty20 to/dev/tty30 ls/dev/tty{2[0-9],30}3, extract text line format according to string pattern: grep [option] ' Match string ' text file ...? Common Command options:-V, take inverse match-I, ignore case ^word to string Word start word$ with string Word end 4, recursively find the corresponding file format according to the preset criteria: Find [directory] [condition 1]? Common Criteria means:-type type (f file, D directory, L shortcut)-name "document name"-size +|-file Size (k, M, G)-user user name-group find owning group-mtime search by Time, past time example: Find All Users St Udent the files that are owned and copy them to the/root/findfiles directory Find/-user Student-type f-exec cp-p {}/root/findfiles \; 5,| Pipeline: Use the preceding output as an example of a later parameter: View the 11th to 15th line of/etc/passwd cat-n/etc/passwd | head-15 | Tail-5 6,more: When the content of the file is more than one screen, a page by page, but can only be turned back less: and more, but less support page 7, help command: Man 、--Helper Example: command is familiar, but forgot some parameter man tar Find the compression package for the command tar parameter 8, view the history command: History Purge historical command: history-c 9,date: View/Adjust system Date Time Example: Date +%f 2018-01-12 Show current date dates + "%y-%m-%d%h:%m:% S "2018-01-12 16:00:56 show current datetime date-s" 2011-11-11 11:11:11 "setting current time is November 11, 2011, 11:11 11 sec 10, redirected output:: Overwrite redirect >> : Append redirect > : Redirect 2> that collects only the correct information;: Redirect &> that collects only error messages;: Collect correct and error message redirection
Linux common commands (ii)