Linux Common Command points

Source: Internet
Author: User
Tags aliases clear screen

①cd:change Directory

CD: The home directory is returned by default without any parameters.

CD ~username: Enter the home directory of the specified user

CD-: Switch back and forth between the current directory and the previous directory

Ii

<> must choose

[] Optional

... can appear multiple times

| Choose one More

{} grouping

Mans:

Name: command names and features brief description

Synopsis: Usage notes, including available options

DESCRIPTION: A detailed description of the command function, which may include the meaning of each option

options: Explaining the meaning of each option

Files: The configuration file associated with this command

BUGS:

EXAMPLES: Using the example

See also: another reference

Flip Screen

Turn back one screen: SPACE

Turn One screen forward: b

Turn down one line: ENTER

Turn One line forward: K

Find

/keyword backwards

N: Next

N: Previous

  

? KEYWORD forward

N: Next

N: Previous


Q: Exit




mkdir: Create empty Directory The last one is the directory node created

-P

-v:verbose

mkdir-pv/x/m/x/n

= MKDIR-PV/{x/m,n}


Command line expansion

Tips:

A_b,a_c,d_b,d_c

={A,D}_{B,C}


Directory Management:

ls cd madir rmdir tree pwd


File Management:

Touch Stat file RM CP MV


Date Time

Date Clock Hwclock cal


To view text:

Cat, TAC, more, less, head, tail


Text Processing:

Cut, join SED, awk, grep, sort


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

Ctrl+d: Delete the character of the cursor

Command history

View command history: Historical

-C: Command to empty command history

-D offset[n]: Delete command at specified location

-D 500 10 Delete 10 from No. 500

-A: Writes the command in the history command buffer to the history command file;

-r: Reads commands from the history command file into the current History command buffer;

-W: Writes the current History command buffer command to the history command file.

Environment variables

Path: Command Search Path

Histsize: Command history buffer size

echo $HISTSIZE Default is 1000


Command history Usage 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 the specified string

! $: Reference the last parameter of the previous command;

Esc.

ALT +.: Support only in the terminal


command completion, command aliases, command substitution


Command completion:

Each path specified by the search PATH environment variable is next to the one we give

The string at the beginning of the executable file, if more than, two times tab,

The list can be given, otherwise it will be directly complete.

Path Completion:

Search for each file name under the starting path we gave, and try to complete the completion.



Command aliases:

Alias cmdalias= ' COMMAND [options] [arguments] '


Aliases defined in the shell are valid only in the current Shell life cycle;

The valid range of aliases is the current shell process;

To be effective, you need to modify the configuration file.


Ualias Comalias


\cmd: Using the command itself


Command substitution:

$ (COMMAND []: []..) = = Anti-quote: ' COMMAND '

The process of replacing a command with a self-command in its execution result

Touch./file-$ (date +%f-%h-%m-%s). txt


Quotes supported by bash:

·· : Command substitution

"": weak reference, you 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-z],[a-za-z]

[: Space:]: Blank

[:p UNCT:]: Punctuation

[: Lower:]: lowercase letters

[: Upper:]: Uppercase

[: Alpha:]: Uppercase and lowercase letters

[:d igit:]: Number

[: Alnum:]: Numbers and uppercase and lowercase letters

# Man 7 Glob View details


[[: Alpha:]]*[[:space:]]*[[:alpha:]]

Letters start and end with white space characters in the middle



[^]: matches any single character outside the specified range

[^[:space:]]: The text does not contain blank


Displays all files that end with a number and do not contain white space in the file name

LS *[[^:space:]][0-9]?????


User's permission location

Tom:ls

Rwxr-xr-x Root Root/bin/ls


LS can be executed, depending on the initiator Tom

Tom first compares with the user owner to see if they are in the same group as the owning group, otherwise it is someone else.


11.


Encryption Method :

Symmetric encryption: Encrypt and decrypt using the same password

Public Key cryptography: each password appears in pairs, a private key is a public key

One-way encryption, hash encryption: Extracting data signatures, often used for data integrity checks

1, the avalanche effect to prevent reverse engineering

2, fixed-length output

Fixed-length output of md5:message digest,128 bit

Sha1:secure Hash algorithm,160 bit fixed length output

This article is from the "12251659" blog, please be sure to keep this source http://12261659.blog.51cto.com/12251659/1902562

Linux Common Command points

Related Article

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.