Extracting .tar file isn't working

孤人 提交于 2019-12-04 05:05:10

try the following command:

tar -xzvf filename.tar.gz

sudo tar -xvf filename.tar

This fixes two problems with the above tar -xv filename.tar.

1st Issue: Needed to include a the -f modifier for tar. Per [lowfatlinux][2], -f is a command for tar that says:

"The archive file name is given on the command line (required whenever the tar output is going to a file)"

Therefore, including the -f modifier tells the tar program that the file name supplied in the arguments is the file to extract from.

2nd Issue: Needed to append sudo to the beginning of the command, to give the shell permission to create directories

Try the following command:

gunzip -c filename.tar.gz | tar xopf -

After you tried gunzip, use tar xopf on that file

tar xopf filename.tar

Your download was most likely corrupted, notice what it says on the website:

NOTE Following links will list to you various available mirrors. DO NOT USE those links directly.

This mirror worked for me on Debian:

wget http://www.us.apache.org/dist/maven/binaries/apache-maven-3.0.4-bin.tar.gz
tar -xvzf apache-maven-3.0.4-bin.tar.gz

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!