tar gzip 怎么一起使用!
时间:2010-04-30 来源:g_hk
How can I extract a tar.gz or .tgz file?
Files with extension tar.gz or .tgz are tar files compressed with gzip. On Unix extract them with:
gunzip < file.tar.gz | tar xvf -
gunzip < file.tgz | tar xvf -
If you have GNU tar you can use the z option directly:
gtar xvzf file.tar.gz
gtar xvzf file.tgz
Can gzip compress several files into a single archive?
Not directly. You can first create a tar file then compress it:
for GNU tar: gtar cvzf file.tar.gz filenames
for any tar: tar cvf - filenames | gzip > file.tar.gz
Ref: http://www.gzip.org/
Files with extension tar.gz or .tgz are tar files compressed with gzip. On Unix extract them with:
gunzip < file.tar.gz | tar xvf -
gunzip < file.tgz | tar xvf -
If you have GNU tar you can use the z option directly:
gtar xvzf file.tar.gz
gtar xvzf file.tgz
Can gzip compress several files into a single archive?
Not directly. You can first create a tar file then compress it:
for GNU tar: gtar cvzf file.tar.gz filenames
for any tar: tar cvf - filenames | gzip > file.tar.gz
Ref: http://www.gzip.org/
相关阅读 更多 +