First, when you use the -f
option to tar
, you need to give it an argument telling it the filename of the archive. Since you're feeding it from a pipe from gunzip
, we use -
to mean standard input:
gunzip -c files_20100623.0110.tar.gz | tar -xvf - home/bsisplas/public_html/staging/template/*.*
My next point would be that you only have to give the directory name. (Also: *.*
is usually a DOS-ism. If you mean "all files" in Unix, just write *
. If you write *.*
you're saying "all files with a dot somewhere in their name" which could exclude important files without a dot, like Makefile
or README
):
gunzip -c files_20100623.0110.tar.gz | tar -xvf - home/bsisplas/public_html/staging/template
That should work. But you can make things a little easier by using tar
's -z
option, which tells it to do the gunzip
itself. We use that, and replace the -
input filename with the archive filename:
tar -xvzf files_20100623.0110.tar.gz home/bsisplas/public_html/staging/template
How does that work?
use tar with the -z flag.. its way more clean than the piping. and you still would have to wait a long time since the archive will be completely unziped before extraction – matthias krull – 2010-06-23T16:49:16.473