Many times I download an archive, extract it somewhere then remove the archive file from the disk (it's just garbage). I have wondered if it's possible to do download and untar on the fly, by one command only:
wget -O - http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.7.3.tar.bz2|tar -xjf -
So what I did was to download the tar.bz2 archive (wget) to the stdout file (-O -) and then, by using the Linux pipe (|), I've redirected the standard output and I've used it like an input (-) for the tar command.
Now, if you think that this article was interesting don't forget to rate it. It shows me that you care and thus I will continue write about these things.
The following two tabs change content below.
Eugen Mihailescu
Founder/programmer/one-man-show at Cubique Software
Always looking to learn more about *nix world, about the fundamental concepts of math, physics, electronics. I am also passionate about programming, database and systems administration. 16+ yrs experience in software development, designing enterprise systems, IT support and troubleshooting.
Latest posts by Eugen Mihailescu (see all)
- Dual monitor setup in Xfce - January 9, 2019
- Gentoo AMD Ryzen stabilizator - April 29, 2018
- Symfony Compile Error Failed opening required Proxies - January 22, 2018