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