This command will be helpful when you do not have an option "z" for tar. In Linux you can directly specify "z" option in tar command but in AIX, you can not ....
To compress: "tar cvf - abc | gzip > abc.tar.gz"
"tar cvf - abc | bzip2 > abc.tar.bz2"
To uncompress:"gunzip < abc.tar.gz | tar xvf -"
"bzip2 < abc.tar.bz2 | tar xvf -"
5 comments:
To uncompress, it should be bunzip2
"bunzip2 < abc.tar.bz2 | tar xvf -"
thanks
satish
Thanks....i never worked on AIX and now i'm in serious of this command..
Thanks!
Great help!
For various compression ratios using:
tar cvf - file1 file2 ... fileN | gzip -(1-9) > abc.tar.gz
Post a Comment