Linux Learning Note 04

Source: Internet
Author: User
Tags clear screen

Sort text: Sort (does not affect the order of the source files only affect the display order)

-N: Numeric sorting

-R: Descending


Uniq

-C: Shows the number of rows in a file that repeats

-D: Show only duplicate rows


Text statistics: WC (word count)


Character processing commands: TR--Convert or delete characters



Bash and its features:

    1. command history, Command completion

    2. Pipe, redirect

    3. Command aliases

    4. Command line editing

    5. Command line expansion

    6. File name wildcard

    7. Variable

    8. Programming


command-line editing:

Cursor Jump:

CTRL + A: Skip to the beginning of the command

Ctrl+e: Jump to the end of the command line

Ctrl+u: Delete the cursor to the beginning of the command line

CTRL+K: Delete the cursor to the end of the command line

Ctrl+l: Clear Screen


Command history:

View command history: Historical

-C: Empty command history


-W: Save the Command history to the history file


Environment variables

Path: Command Search Path

Histsize: Command history buffer size


The use of command history tips:

!n: Executes the 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

Esc.


Command completion: Search the PATH environment variable specified by each of the paths with the string we give the beginning of the executable file, if more than one, two times tab, you can give the list: otherwise it will be directly complete

Path completion: Searches for each file name under the starting path we give, and tries to complement the entire


Command aliases

Alias

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

To replace a subcommand in a command with the process of executing the result



BASH-supported quotes


": Command substitution

"": weak reference, can implement variable substitution

': Strong reference, do not complete variable substitution


File name wildcard,

*: Any character of any length

? : Any single character

"": matches any single character within the specified range














Linux Learning Note 04

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.