Linux Common commands

Source: Internet
Author: User

Cat: View file contents sequentially


TAC: View file contents in reverse


Head: View the contents of the file sequentially, default to the first 10 lines


Tail: Reverse View file contents, default after 10 lines





Sort: Sorting at the beginning of a line, example: CAT/ETC/PASSWD | Sort--The first letter is A,b,c,d, sorted out by default: According to ASCII code--and large arrangement

-T: Sorting using the specified delimiter, example CAT/ETC/PASSWD | Sort-t ': '-K 4---Semicolon-delimited with 4th column


Cut: Extracts a paragraph from each line in the file

-b:cut-b 2/tmp/test.txt---Only the second column of the output file Test.txt content

-C:CUT-C 1-5/tmp/test.txt---Output file test.txt 1-5 columns of content

-F1: Used in conjunction with-D, example: cut-f1-d 1 ', '/tmp/test.txt--outputs a comma-delimited section of characters







------------------------------in the update--------------------

This article from "This Life Carefree" blog, declined reprint!

Linux Common commands

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.