tar usage

 -c, --create
       create a new archive
       create a new archive

 -x, --extract, --get
       Extract Files from Archive AN
       extract from the archive file

 

Pack and compress (multiple files in a folder):

tar -cvf log.tar 1.txt is only packaged, not compressed
tar -zcvf log.tar.gz 1.txt is packaged, compressed with gzip 
tar -jcvf log.tar.bz2 1.txt is packaged, compressed with bzip2 

 unzip

tar -zxvf compressed package name.tar.gz

tar -jxvf compressed package name.tar.bz

Guess you like

Origin blog.csdn.net/Growing_hacker/article/details/103805043
tar