Centostar compression and decompression commands

Source: Internet
Author: User
When managing centos servers, you often perform some common operations on files. in addition to ftp, it is also essential to know the necessary file Operation Commands under ssh, the following are some common file Operation Commands: File operation: ls #### view files in the directory #### ls-F ### perform common operations on files when querying and managing centos servers, in addition to ftp, it is essential to know the necessary File operation commands in ssh. The following is an excerpt from some common file operation commands: File operations:Ls #### view files in the directory #### ls-F #### view files in the directory ##### ls-l ### display files and directories details #### ls-a #### show hidden files #### ls * [0-9] * ### display the file name and directory name containing numbers #### rm go.tar #### delete the go.tar file #### find mt. cgi #### find the file name as mt. cgi file #### df? H #### view the remaining disk space #### find/-name xxx-print #### search for xxx Files #### Compression and decompression:Tar xvf wordpress.tar #### decompress a tar file #### tar-tvf myfile.tar #### view the files contained in the tar file ### tar cf toole.tar tool into another example to package the toolcatalog as toole.tar file #### tar cfz xwyme.tar.gz tool variable is almost 10 MB #### tar jcvf/var/bak/www.tar.bz2/var/www/#### create the .tar.bz2 file, high compression rate #### tar xjf www.tar.bz2 unzip the tar.bz2 format #### gzip-d ge.tar.gz unzip file #### unzip phpbb.zip unzip files are still a little troublesome ### bunzip2 file1.bz2 #### decompress a file named 'file1.bz2' #### bzip2 file1 #### compress a file named 'file1' #### gunzip file1.gz #### decompress a file named 'file1.gz '#### gzip file1 #### compress a file named 'file1' #### gzip-9 file1 ### maximum compression #### rar a file1.rar test_file #### create a package named 'file1.rar '### rar a file1.rar file1 file2 dir1 ### simultaneously compress 'file1 ′, 'file2' and the Directory 'dir1' #### rar x file1.rar #### decompress the rar package #### unrar x file1.rar #### decompress the rar package #### tar-cvf archive.tar file1 #### create a non-compressed tarball #### tar-cvf archive.tar file1 file2 dir1 ### create a file containing 'file1 ′, 'file2' and 'dir1' file #### tar-tf archive.tar #### display the content in a package #### tar-xvf archive.tar ### release one package #### tar-xvf archive.tar-C/tmp #### release the compressed package to the/tmp directory #### tar-cvfj archive.tar.bz2 dir1 #### create a bzip2 compressed package #### tar-xvfj archive.tar.bz2 #### decompress a bzip2 compressed package #### tar-cvfz archive.tar.gz dir1 ### create a gzip format compressed package #### tar-xvfz archive.tar.gz #### decompress a compressed package in gzip format #### zip file1.zip file1 ### create a compressed package in zip format ### # zip-r file1.zip file1 file2 dir1 #### compress several files and directories into a zip package #### unzip file1.zip #### decompress a zip package ####
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.