-
Package (.tar):
-
All files tar -cvf Pro.tar / home / lin / Pro # the / home / lin / Pro folder packed into Pro.tar
-
-
Playing unpack (.tar.gz)
-
tar -cvzf firefox-3.0.3.tar.gz firefox # firefox folder will be packaged as-3.0.3.tar.gz firefox
tar -xvzf firefox-3.0.3.tar.gz
-
-
Playing unpack (.tar.bz2)
-
tar -cvjf firefox-3.0.3.tar.bz2 firefox / # firefox folder will be packaged as-3.0.3.tar.bz2 firefox
tar -xvjf firefox-3.0.3.tar.bz2
-
-
Parameter Description:
-
c create a new archive. If you want to back up a directory or some files, you must choose this option.
x released files from the archive.
v detailed report tar processing file information. The absence of such option, tar does not report file information.
z with gzip to compress / decompress the file, the option to add the archive file can be compressed, but the reduction must also be decompressed using this option.
f Use the archive file or device, this option is usually mandatory.
-
-
Tar.gz and tar.bz2 extract the compressed files of different commands as follows:
-
Unzip the file tar.gz
-
tar -zxvf ××× .tar.gz
-
2 extract the tar.bz2 file
-
takes -jxvf ××× tar.bz2
-
-
-z: gzip whether the property has both? Namely the need to use gzip compression?
-j: whether bzip2 has both attributes? That is, whether compressed with bzip2?
Linux using tar package
Guess you like
Origin blog.csdn.net/qq_27084325/article/details/93544034
Recommended
Ranking