Common commands for the shell

Source: Internet
Author: User

Sort

Handle sorting problems.

For example: Sort-r/file the rows of file in descending order.


Tr:

As a simplified version of SED, you can replace another character with one character, or delete some characters.


Cut

Splitting according to the line of the file is a selection command that splits what we want.

For example: Cat/etc/passwd|cut-b 1-5 takes the 1th to 5th bytes of each row.


Paste

Merging multiple file contents is just the opposite of what the Cut command does.

For example: Create File1, write content aaa, create file2, write content bbb paste-d: file2 file1 get: bbbaaa


Uniq

Filter the repeating section to display the file contents.


Tee

Redirect output to screen and file.


Wc:

The number of words in the statistics file, how many lines, how many characters.

Common commands for the shell

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.