Common text viewing and processing tools for Linux

Source: Internet
Author: User
Tags diff

Wc:word Count

WC [OPTION] ... [FILE] ...

-l:lines

-w:words

-c:bytes

Cut: Text Capture tool

Cut OPTION ... [FILE] ...

OPTION:

-D CHAR: Delimiter with the specified character;

-F Fields: the selected field;

#: The specified single field;

#-#: multiple consecutive fields;

#,#: discrete multiple fields;


Sort: Text Sorting tool

Sort [OPTION] ... [FILE] ...

-N: Based on the value of small sorting rather than character sorting;

-T CHAR: Specifies the delimiter;

-K #: The field used to sort the alignment;

-R: Reverse order;

-F: Ignore character case;

-U: Duplicate lines are reserved only one copy;

Repeating rows: continuous and identical;


Uniq: report or remove duplicate rows

Uniq [OPTION] ... [INPUT [OUTPUT]]

-C: Count the number of repetitions per row;

-U: Displays only rows that have not been duplicated;

-D: Displays only the rows that have been repeated;


diff: Compare differences in file content by line

diff [OPTION] ... FILES

Diff/path/to/oldfile/path/to/newfile >/path/to/patch_file

-U: Using the unfied mechanism, the limit is the context of the row to be modified, the default is 3 rows;


Patch: Patching Files

Patch[options]-i/path/to/patch_file/path/to/oldfile


Path/path/to/oldfile </path/to/patch_file


Common text viewing and processing tools for Linux

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.