tags:

views:

36

answers:

2

I often need to fetch tgz files, decompress them, and then delete the tgz. How can I do all three steps with one simple command?

+2  A: 
wget http://site/path/file.tgz -O - | tar -zxvf -
matja
+1  A: 

You can can use:

curl <url> | tar xz

Or put in your bashrc:

function ctxz {
   curl $1 | tar xz
}

and just use:

ctxz <url>
Gj
thanks! elegant and works well for me.
Inshim