Basic Linux operations-sorting, splitting, merging, archiving, etc.

Source: Internet
Author: User
Linux basic operations-file sorting, splitting, merging, archiving, and other 1sort1sort commands regard the input file as a data stream composed of multiple records, and the record is composed of fields of variable width, the basic format of the 2sort command is sort option Linux basic operation-file sorting, splitting, merging, archiving, etc. The 1 sort 1 sort command regards the input file as composed of multiple records. data flow, the record is composed of fields with variable width, basic format sort option file 3 sort command option and its meaning option meaning-c test file whether the file has been sorted by the domain specified by-k-m merge two sorted files-n sort by number size-o output files write the output to the specified file, it is equivalent to redirecting the output to the specified file-r and displaying the sorting result in reverse order-t changing the domain separator-u removing duplicate rows in the Result 2 uniq 1 uniq command is used to remove duplicate lines of text, this is similar to the basic usage of the-u option 2 uniq command of the sort command uniq option file 3 uniq command option and its meaning option meaning-c print the number of times each line appears repeatedly in the text-d only displays duplicate records, each duplicate record appears only once-u only displays records without duplicates 3 cut 1 cut command is used to extract the basic format cut option of the text 2 cut command from standard input or text files by field or line file 3 cut option and its meaning option meaning-c specifies the number of extracted characters or character range-f specifies the range of extracted fields or fields-d changes the domain delimiter 4 tar 1 tar command is linux Archive command, in layman's terms, the tar command compresses and decompress Linux system files. The basic format of the 2 tar command is tar option file name or directory name. The 3 tar command option and its meaning. the option meaning: c. create a new package- r adds a new file for the package-t lists the package content-u updates the files in the package, if this file is not included in the package, add the file to the package-x extract the file-v detailed report tar information-f use a compressed file or device, this option is usually required.-z uses gzipzip to compress and decompress the file. if it is a tar package ending with .gz, this option is required. 4. extract the tar-xvf package name from a non-gzip file and decompress the tar-zxvf package. name
Related Article

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.