Linux common commands (ii)

Source: Internet
Author: User

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&gt that collects only the correct information;: Redirect &&gt that collects only error messages;: Collect correct and error message redirection

Linux common commands (ii)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.