This tip is a rather simple but useful one. It’s not a trick or anything fancy, but just something that I somehow didn’t know for a long time that I wish I would have. A common thing to do in Linux/Unix/Whateverix is to download a tarball archive that has been gzipped and then extract and untar it. So you might do somethig like this:
tar -xvf myfile.tar
The first command unzips it. The second command extracts the tar archive. What I didn’t know is that you can combine all of this into one simple command! Just do the following:
Most linux version support the following command:
tar -zxvf myfile.tar.gz
However on AIX you need to pipe the commands like this:
gunzip myfile.tar.gz | tar xvf –
gunzip < abc.tar.gz | tar xvf -That's all there is to it!