tar and gzip / bzip on a single command in AIX

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 -"
Share:

No comments:

Post a Comment

Popular Posts