Tuesday, August 5, 2008

How To Download and Un-Tar in One Step

Downloading and un-tarring linux souce codes normally takes more than two steps. Linux source codes normally comes as compressed and tarred files in tar.gz file format, which could easily be uncompressed and un-tarred using tar linux command.

Here's a quick linux tip on how to download and untar linux source file in single step

Traditional Step on Downloading and Un-Tarring Compressed Linux Tar Files

# wget -c http://www.ilovetux.com/downloads/linux-kernel.tar.gz

# tar zxvf linux-kernel.tar.gz

Shown from above are the longest step to download and untar compressed linux tar file

Quick Step To Download and Un-Tar Compressed Linux Tar Files


# wget -c http://www.ilovetux.com/downloads/linux-kernel.tar.gz  && tar zxvf linux-kernel.tar.gz

The linux commands are being combined using && characters which instructs linux to execute the first command in background. And as soon as the first command is finished, the second command, which is the untarring of files, would then be executed. This quick step only requires a single step command.

All is done

0 comments:

Sign up for PayPal and start accepting credit card payments instantly.
ILoveTux - howtos and news | About | Contact | TOS | Policy