web123456

Linux decompression command

This article is reproduced on WeChat official account, VASP learning and communication, and will continue to be updated

.tar

  • Unpacking: tar xvf file name.tar

  • Packaging: tar cvf file name.tar file name

tar is just packaged, and the packaged files and memory have not changed before packaged.

.gz

  • Decompress 1: gzip -d file name.gz

  • Unzip 2: gunzip file name.gz

  • Compress: gzip file name

gzip will delete the source file after compressing the file. It does not support retaining the source file, so be cautious when using it

Memory reduction after gzip compression

.or.tgz

  • Unzip: tar zxvf file name.

  • Compression: tar zcvf file name. File name

  • eg. Unzip the file tar zxvf

  • eg. Compress test folder tar zcvf test

.bz2

  • Decompress 1: bzip2 -d file name.bz2

  • Unzip 2: bunzip2 file name.bz2

  • Compression: bzip2 -z file name

.tar.bz2

  • Unzip: tar jxvf file name.tar.bz2

  • Compression: tar jcvf file name.tar.bz2 file name

.zip

  • Unzip: unzip file name.zip

  • Compression: zip file name.zip file name

.rar

  • Unzip: rar x file name.rar

  • Compression: rar a file name.rar file name

.Z

  • Uncompress: uncompress file name.Z

  • Compress: compress file name

.

  • Unzip: tar Zxvf file name.

  • Compression: tar Zcvf file name. File name