Tar supportpackage and compress, support directories and files, use a wide range of compression tools on Linux
Tar Packaging:
TAR-CVF 171210.tar?.. /d6z/ |
Package a directory, the format is the first package after the file name, packaged directory, if the package after the file name exists, will be directly overwritten without prompting |
TAR-XVF 171210.tar |
Unpack if there is a file with the same name directly overwrite without prompting ? |
TAR-CVF Test.tar?/1/1.txt 3.txt |
Package files and directories at the same time, |
TAR-TF Test.tar |
View a list of packaged files or directories |
TAR-CVF 171211.tar? --exclude Test.tar--exclude 171210.tar 1.txt 2.txt 1/ |
--exclude filter out some files not packaged |
TAR-CVF 171211.tar? --exclude "*.txt". /d6z/ |
Do not package txt files |
Tar compression and packaging
TAR-CZVF 1.tar.gz./ |
-Z Package and use gzip to compress the directory |
TAR-CZVF 1.tar.gz? 1.txt 2.txt 3.txt |
Package and compress the specified files to a compressed package using gzip |
TAR-ZXVF 1.tar.gz |
Unzip the GZ compressed package to the current directory |
< P style= "font-family: ' Microsoft Jacob Black '; font-size:19px;" >TAR-CJVF 1.tar.bz2? [1-3].txt |
-j Pack and use b zip 2 compress the specified file to the compressed package |
TAR-JXVF 1.tar.bz2 |
Unzip bz2 Compress package to current directory |
TAR-CJVF 1.tar.xz? [1-3].txt |
-J package and use XZ to compress the specified file to the compressed package |
< P style= "font-family: ' Microsoft Jacob Black '; font-size:19px;" >du-sh 1.tar.* |
988k??? 1.tar.gz |
TAR-TF 1.tar.gz /bz2/xz |
View a list of compressed files |
The tar summary of the Linux compression command (v)