Tar extract Z file

I was looking at this tutorial for tar extract Z file. Is there a reason why this did not work? I checked my man pages and it had a -Z option.

tar -xZvf /opt/Nimsoft/nimldr.tar.Z
tar (child): compress: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

Open/Extract taz/tz/tar.Z/Z File with Freeware on Windows/Mac/Linux, Free Download

This worked.

zcat *.Z | tar -xvf -
./
./SOLARIS_10_sparcv9/
./SOLARIS_10_sparcv9/nimldr
./LINUX_23_64/
./LINUX_23_64/nimldr
./AIX_6_64/
./AIX_6_64/nimldr
./HPUX_11_ia64/
./HPUX_11_ia64/nimldr
./SOLARIS_10_i386/
./SOLARIS_10_i386/nimldr
./LINUX_23/
./LINUX_23/nimldr
./HPUX_11_64/
./HPUX_11_64/nimldr
./LINUX_23_ppc64/
./LINUX_23_ppc64/nimldr
./SOLARIS_10_amd64/
./SOLARIS_10_amd64/nimldr
./LINUX_23_ppc64le/
./LINUX_23_ppc64le/nimldr

In Unix, how can I uncompress *.Z or *.tar.Z files?

tar (child): compress: Cannot exec: No such file or directory

As the slightly irritating message states: the compress utility is not found. You have to install it.

In Ubuntu the corresponding package is called ncompress .

2 Likes

GNU Zip will decompress .Z files, so

gunzip -c somefile.tar.Z | tar xf -

or

zcat somefile.tar.Z  | tar xf -

should work without having to install the compress utility. It may even be possible to use GNU Zip through tar with the lower-case-z option:

tar zxf somefile.tar.Z

Andrew

2 Likes
Moderator comments were removed during original forum migration.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.