Linux Common commands

Source: Internet
Author: User

1. Unzip the command

. tar.gz, or. tgz files are generally compressed with tar and gunzip under UNIX, but they do not retain the source files

How to extract the reserved source files under Linux:
Gunzip–c filename.gz > FileName

Gunzip *.tgz (can convert. tgz to. tar files)
Use the unzip. tar file for the command tar C *.tar (to create the meaning of the unzip directory)
Tar TVF *.tar (see Table of Contents meaning, can be omitted)
tar xvf filename.tar (unzip)

Tar zxvf myfile.tgz

Gunzip filename.gz

Reference: http://alex09.iteye.com/blog/647128

Linux comes with the Unzip command can decompress windows under the zip format the compressed file

Syntax: Unzip [Options] Compress file names . zip

The meanings of each option are:

-X file list to unzip the file, but not include the specified file file.

-V View the compressed Files directory, but do not press.

The-t test file has no damage, but does not understand the pressure.

The-D directory unlocks the compressed file to the specified directory.

-Z displays only annotations for compressed files.

-N does not overwrite files that already exist.

-O overwrites files that already exist and does not require user confirmation.

-j does not recreate the directory structure of the document, extracting all the files into the same directory.

2. View disk usage DF-LH

3. Less

The less tool is also a tool for paging through files or other output, which is a very powerful tool for Linux to view the contents of a file. The usage of less is more resilient than more. In more, we have no way to turn front, can only look back, but if use less, you can use [PageUp] [PageDown] and other key functions to go to look at the file, more easily used to view the contents of a file! In addition, in less you can have more search function, not only to search down, but also to search upward.

Command format:

Less [parameter] file

Command function:

Less is similar to more, but you can browse files at will with less, and more can only move forward, but not backwards, and no will load the entire file before viewing it.

Linux Common commands

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.