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:
阅读(4077) | 评论(0) | 转发(0) |