Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tar and Compress

Status
Not open for further replies.

aneesz

Technical User
Nov 12, 2000
17
0
0
MY
Dear expert,

How to tar files and compress them at the same time.. Currently i'm using AIX 5.2.

Thanx in advance..


 
Hi,
You can use named pipes to tar and compress on the fly this way :

mknod /path/to/np p # create a named pipe
tar cvf /path/to/np /files/to/tar & # tar on background process
compress < /path/to/np > /path/to/file.tar
rm /path/to/np # delete the named pipe

I Hope this helps
 
Hi,


you can also install and used the new version of tar wich include as in Linux all the compress options:Z, gz, bz, bz2 ...
 

new = GNU?

You just have to remember to install gzip, bzip2, etc because GNU tar doesn't have them built-in.

Cheers
 
Here is an example to uncompress:

uncompress -c file | tar xvf - /target
 
The GNU tar from UCLA includes the gzip option, so to use that: /usr/local/bin/tar cvzf archname.tar.gz file1 file2 ...

IBM Certified Confused - MQSeries
IBM Certified Flabbergasted - AIX 5 pSeries System Administration
MS Certified Windblows Rebooter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top