RHEL7 learning punch (4 day)

1. packing compression and name search order

tar command:

Gzip compressed file format for the name .tar.gz archive tar -czvf

NOTE: c compression; Z is Gzip compression; V compression; target file F

Extracting Gzip file format tar -xzvf codecs package names .tar.gz -C / etc

Note: x decompression; Z is Gzip decompression; V decompression process; target file F; C compression specified directory

 

Bzip2 compressed file format for the tar -cjvf .tar.bz2 archive name

Note: c compression; j is compressed with bzip2; v compression; f target file

Extracting Gzip file format tar -xjvf codecs package names .tar.bz2 -C / etc

Note: x decompression; j is bzip2 decompression; v decompression process; f target file; C compression specified directory

grep command:

It used to perform a keyword search the contents of files in the file

Format: grep -n keyword file

Note: -n is the line number

find command:

It is a comprehensive file search

find search path parameters search criteria 

2. output redirection:

Format: command> file (empty write)

Format: command >> file (additional writing)

Format: command 2> file (empty write error)

Format: 2 >> command file (additional writing error)

Format: command &> file (All Clear written)

Format: Command & >> file (all additional writing)

 

3. Pipeline operators:

The previous command is supposed to be output to the standard output data after the normal standard screen as a command

Format: Command | command

4. instruction line communication Hythe

* Represents matching zero or more characters

? Represents the match is a character

[0-9] represents a single numeric characters match

Representative [az] matches a single alphabetic character

The escape character

The backslash (\): the variable behind a backslash into a simple string.
Single quotation marks ( ''): wherein all variables escaped as a simple string.
Double quotes ( ""): wherein the variable attributes retained without escaping.
Backtick ( ``): the return result executes the commands.

6. environment variables:

Commands are divided into:

a. + path name

b.alias alias

c. builtin (specific gravity 0.01%)

d. external command (specific gravity 99.9%)

And most of the time the user input is an external command, you can use the "type the command name" to determine the order entered by the user is an internal command or external command.

 

Guess you like

Origin www.cnblogs.com/zjhhzs/p/11517920.html