MYSYSAD.COM

Extract the Contents of a Compressed Tar File

· Files & disks

A colleague of mine asked about extracting the contents of a compressed tarball into a particular directory. I suggested downloading the tarball into the /tmp directory. It was a fairly large tarball consisting of several hundred megabytes. Here's an example of what was done.

#cd /tmp
#zcat compressed_tarball.Z | (cd /export/opt; tar xvfp -)