Shell: download and unzip on a line

0

I tried to use wget with tar as follows

wget -qO- [url] | tar xvf

but I can not get the expected effect. Are there other ways to do this?

    
asked by anonymous 29.06.2017 / 15:37

3 answers

1

I got it using

wget -qO- [link] | tar xz

The z-parameter has been inserted because it is a tar.gz file.

    
29.06.2017 / 15:42
1

You can use

wget [link] && tar xvzf [nome_arquivo].tar.gz && rm [nome_arquivo].tar.gz
    
29.06.2017 / 15:47
1

What about:

$ wget -O - https://ftp.gnu.org/gnu/binutils/binutils-2.7.tar.gz | tar xvzf -
    
29.06.2017 / 16:05