Linux Basic command Use (iii)

Source: Internet
Author: User

1. Compression decompression command: gzip,. gz format

The gzip file name is compressed.

Linux compressed into Windows can be decompressed, but under Windows compression to Linux decompression is not necessarily possible.

(1) Only files can be compressed. The directory cannot be compressed.

(2) Do not keep source files

gzip-d. GZ unzip or gunzip. gz

2. Tar command.

Unzip. tar.gz

You can package the directory as a file. - x is the unpacking

3.. zip default Linux and Windows generic.

The ZIP-R option is to compress the directory, preserving the source file

Zip option to compress file name source files

4. . bz2, is an upgraded version of Gzip. Ideal for compressing large files, the compression ratio is particularly alarming.

Bzip2-k compressed file, with-K preserves the source file

Unzip the word with Bunzip-k unzip the file will also retain the decompression file

5. Network communication directive: Write,wall

6.shutdown-h now specifies how long after the shutdown

Reboot restart

7.shell?

8.

Bash inside

Ctrl + L and command clear, are clear screen

9. Command aliases: Alias

Alias COPY=CP

Alias rm= "Rm-r" Note that the command combination needs to be quoted

Remove with Unalias

10. Input and output redirection:

0 is the standard input stdin (keyboard), 1 is the standard output stdout (monitor), 2 is the standard error output stderr

Output redirect > A symbol will overwrite,>> two can be appended

2> is error output redirect if you look at a file that does not exist, then you can

11. Piping:

To pass the output of one command to another command

12. Command substitutions:

such as Ls-l ' which touch ' is the output of which touch as the parameters of the Ls-l to execute

Linux Basic command Use (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.