1832757 Members
3141 Online
110045 Solutions
New Discussion

Re: UNCOMPRESS Command

 
DK Raviraja
Occasional Advisor

UNCOMPRESS Command

Hi Friends

This is similar to my earlier Question which is wrngly posted in Database Category.

Problem

I got a file abc.tar.Z file in mount point. I don;t have sufficient space to compress the same in that mount point.

I would like to uncompress this file, so that uncompressed file will be in some other mount point.
Mera Bharath Mahan
4 REPLIES 4
Dan Hetzel
Honored Contributor

Re: UNCOMPRESS Command

Hi,

Simply use the -c flag which forces writing
to standard output. Ni files are changed.

Example:
uncompress -c abc.tar.Z > /home/new.tar

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Andreas Voss
Honored Contributor

Re: UNCOMPRESS Command

Hi,

you could also do:
zcat abc.tar >/newdir/abc.tar
(Note you can leave the .Z extension because zcat recognizes this automatically)

Regards
Madanagopalan S
Frequent Advisor

Re: UNCOMPRESS Command

you can use the -c option; this will write the output to stdout;
this will not change the source file name (file.tar.Z).
you can just output the stdout to file.

test1> uncompress -c test.tar.Z > ../test.tar
/> ll test.tar

the source file still in compressed format and you
will get the uncompressed format file in different dir.

Hope this helps.
let Start to create peaceful and happy world
Lawrence Mahan
Frequent Advisor

Re: UNCOMPRESS Command

Here is what I do.

zcat abc.tar.Z | tar xvf -

The zcat will uncompress the tar file to standard out, Pipe this to tar. The -f - will take the tar image from standard in.

Good luck.