"Self-learning Linux" Linux file System Management (III)

Source: Internet
Author: User
Tags aliases

Cat: Connect and display
-N: Numbering all lines of the output
-e: Show $ at end of each line

Split screen display: more, less

Head: View top n rows, n defaults to 10
-N

Tail: To view the following n rows, n defaults to 10
-N

Cut
-D: Specifies the field delimiter, which is the default space
-F: Specify the fields to display

Sort: Text sort
-N: Numeric sorting
-R: Descending
-T: Field delimiter
-K: Which field is sorted by keyword
-U: The same row is only displayed once after sorting
-F: Ignore character capitalization when sorting

Uniq
-C: Shows the number of rows in a file that repeats
-D: Show only duplicate rows

WC (Word count): text statistics
-L: Count rows
-W: Count words
-C: Statistics of bytes
-L: Prints the longest line length

Character Processing commands:
TR: converting or deleting characters
[TR AB-AB]
-D: Delete all characters that appear in the character set

Command history:
History: Viewing command Histories
-C: Empty command history
-D OFFSET [n]: Delete command at specified position
-W: Save the Command history to the history file

Environment variables:
Path: Command Search Path
[Echo $PATH]

Histsize: Command history buffer size
[Echo $HISTSIZE]

The use of command history tips:
!n: Executes the nth command in the command history
!-n: Executes the last nth command in the command history
!: Executes the previous command
!string: The most recent command in the command history that starts with a specified string
!$: Reference the last parameter of the previous command
Shortcut key: esc+. or ALT +.

Command aliases:
Alias cmdalias= ' COMMAND [option] [argument] '

Ualias cmdalias: Canceling command aliases

Command substitution: $ (command), anti-quote: ' command '

Quotes supported by bash:
": Command substitution
"": weak reference, can implement variable substitution
': Strong reference, do not complete variable substitution

File name wildcard, globbing
*: Any character of any length
?: any single character
[]: matches any single character within the specified range
[Abc],[a-m],[a-za-z],[0-9a-za-z]
[: Space:]: white space character
[:p UNCT:]: Punctuation characters
[: Low:]: Small Letter
[: Upper:]: Uppercase
[: Alpha:]: Uppercase and lowercase letters
[:d igit:]: Number
[: Alnum:]: Numbers and size letters
[^]: matches any single character outside the specified range
For example [[: Alpha:]]*[[:space:]]*[^[:alpha:]]

This article is from the "Maskpaperman" blog, make sure to keep this source http://mrros.blog.51cto.com/9403540/1851976

"Self-learning Linux" Linux file System Management (III)

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.