简体   繁体   中英

zcat won't unzip files properly

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.

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.

当我想gzip时,我一般只是直接使用gzip:

gzip -dc /file/address/file.tar.gz
zcat archive.tgz | tar -x --wildcards apri/fls/filename

gzip --解压 /file/address/file.tar.gz

If you ad the .Z to the end of the filename like this :

zcat /file/address/file.tar.gz.Z

then it will find the file .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM