sh 提取TAR文件

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 提取TAR文件相关的知识,希望对你有一定的参考价值。

# How do I extract a tar.gz or .tgz file?

# Files with extension tar.gz or .tgz are tar files compressed with gzip. On Unix system extract them with following command:
gunzip < file.tar.gz | tar xvf - $ gunzip < file.tgz | tar xvf -

# If you have GNU tar (Linux system) you can use the z option directly
# -f option must be last because it defines the file
tar -xvzf file.tar.gz
tar -xvzf file.tgz

# How do I extract a gz file?
# Use guzip command as follows:
$ gunzip file.gz

# OR
$ gzip -d file.gz

# To see new file, enter:
$ ls -l

以上是关于sh 提取TAR文件的主要内容,如果未能解决你的问题,请参考以下文章