Linux Text Processing Command notes summary

Source: Internet
Author: User

Directory Management:

LS, CD, pwd, mkdir, Rmdir/tree


File Management

Touch, stat, file, RM, MV, Nano


Date Time:

Date, clock, Hwclock, CA


To view text:

Cat, TAC, more, less, less, head, tail


Cat: Connect and display

-N

-E

Split screen display:

MORE: Flip Forward

Less

Head: View Top N rows

Tail: View after n rows

n Default is 10 rows

Tail-f: Look at the end of the file, do not exit, wait for the new content appended to this file to appear:


Text Processing:

Cut, join, SED, awk


Database: Databases

Relational database:

Table: two-dimensional tables (rows, columns)


Cut

-D: Specifies the field delimiter, which is the default space

-F: Specify the fields to display

-F 1,3 display specifies the first and third

-F 1-3 Display specifies the first, second, and third fields

Text sort: Sort (affects the order of display only, does not change the contents of the file, by default the ASCII size of the characters from left to right, from small to large sort)

-N numeric sorting by numeric size

-R Reverse Reverse order

-T Field delimiter

-k specifies which field to sort by keyword eg:sort-t:-k3/etc/passwd

-U sorts the same rows once, only once

-F Sort ignores character case

Uniq:report or omit repeated lines

Note: In the same file, only rows with identical contiguous content are considered repeated lines

-C Displays a repeating count of a row

-D displays only duplicate rows


Text statistics: Wc:word count

-L Number of rows

-W Character Count

-C byte

The longest line of-l, how many characters are there

Character processing commands: TR--Convert or delete characters

TR [OPTION] ... SET1 [SET2]

-D Delete all characters that appear in the character set

TR AB-AB

Tr ' A-Z ' A-Z ' </etc/passwd



Text Processing Cat,more,less,head,tail,cut,sort,uniq,grep

Pipelines and redirects: > < >> <<

Users, Groups, permissions

Bash and its features


How do I get the latest kernel version number for Linux?

www.kernel.org

List the Linux distributions you know more about, and explain their shutdown with the Linux kernel.

Linux, Gnu/linux, source code

Release: Fedora, RedHat (Centos), Suse,debian (Ubuntu,mint), Gentoo, LFS (Linux from Scratch)


This article is from the "Richier" blog, make sure to keep this source http://richier.blog.51cto.com/1447532/1629385

Linux Text Processing Command notes summary

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.