views:

726

answers:

4

Hi,

I need to unzip a compressed file on the fly in my program. It works when I try it on my own linux computer, but for some reason the school computers fail whenever I tell them to do it. To unzip I'm using the following command:

 zcat /file/address/file.tar.gz

and get the error:

 /file/address/file.tar.gz.Z: No such file or directory

I tried looking through the documentation but couldn't find a flag to turn off this odd behavior.

Any help will be greatly appreciated.

Thanks

+3  A: 

Your school's system still has the old "compress" style utilities rather than the newer GNU "gzip" based ones.

You need to use gzcat rather than zcat, assuming that it's available.

Alnitak
That did the trick, thanks.Also, I just learned that I was running the command on the school's Sun computers. It's the linux pc's that my program needs to run on and they support zcat just fine.
Zain
A: 

gzip --decompress /file/address/file.tar.gz

SumoRunner
A: 

I generally just use gzip directly when I want to gzip:

gzip -dc /file/address/file.tar.gz
Dustin
A: 

zcat archive.tgz | tar -x --wildcards apri/fls/filename

problem