table of Contents
1.rar compression, unrar decompression
2. Shell compression methods commonly used
3. Shell commonly used decompression methods
1.rar compression, unrar decompression
(1) Install rar/unrar under ubuntu
sudo apt-get install rar
sudo apt-get install unrar
(2) rar is used for compression, unrar is used for decompression
rar a test.rar
unrar x test.rar
2. Shell compression methods commonly used
tar --cvf jpg.tar *.jpg pack all jpg files into tar.jpg
tar -czf jpg.tar.gz *.jpg After all jpg files are packaged into jpg.tar, and compressed into jpg.tar.gz with gzip
tar -cjf jpg.tar.bz2 *.jpg After all jpg files are packaged into jpg.tar, and compressed into jpg.tar.bz2 with bzip2
tar –cZf jpg.tar.Z *.jpg After all jpg files are packaged into jpg.tar, and compressed into jpg.tar.Z with compress
zip jpg.zip *.jpg Compression in zip format, you need to download zip for linux first
3. Shell commonly used decompression methods
tar --xvf file.tar decompress the tar package
tar -xzvf file.tar.gz 解压 tar.gz
tar -xjvf file.tar.bz2 解压 tar.bz2
tar --xZvf file.tar.Z decompress tar.Z
unrar e file.rar depressurar
unzip file.zip unzip zip