V
V
Vladimir2012-01-12 22:28:38
linux
Vladimir, 2012-01-12 22:28:38

Unpacking a tar archive on the fly

There is a large archive with a directory tree. It is necessary to unpack it without saving it locally, since there will not be enough space for the archive + unpacked data from the archive.

Is it possible to unpack a tar archive on the fly, downloading it from a remote machine and not waiting for the final download.
As I understand it, the following command will first download the entire archive, and only then it will begin to unpack it:

wget ftp://server/tree.tar | tar -xf tree.tar

Answer the question

In order to leave comments, you need to log in

5 answer(s)
@
@sledopit, 2012-01-12
@koef

wget -qO - server/tree.rar | tar -xf -
And your command will simply save the file and will not even unpack it.

P
phasma, 2012-01-12
@phasma

Linux has nc, and you can also use normal ssh

V
Vlad Zhivotnev, 2012-01-12
@inkvizitor68sl

If there is access via ssh -
ssh [email protected] tar -xvf /bla/file.tar | /localdir/

M
mayorovp, 2012-01-12
@mayorovp

Alternatively, you can try using the -O switch to redirect the file download to a named pipe.
An alternative is to mount ftp://server/ as a network directory.
May google help you!

R
Radriga, 2012-01-13
@Radriga

Is there enough RAM to place the archive on a ramdisk?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question