On Wed Dec 06 2000 at 08:46, Gordon Chamberlin wrote:
> tar does accept input from stdin. Use '-'. So something like:
> dd if=/dev/hda bs=10k skip=0 count=10000 | gzip | tar -cMf /mo/file.tgz -
>
> Thta last '-' is the key.
It sure is...
[tomsrtbt]$ mount -t ext2 /dev/hda2 /mnt
[tomsrtbt]$ tar cf - /mnt | nc -w 4 192.168.20.20 4444
and on the box with that IP (ran just _before_ doing the above)...
[otherhost]$ nc -l -p 4444 | tar xf -
That trick I use a *lot* :)
(I don't tend to use the "z" options when using netcat over a
network, it doesn't seem to make much of a difference over a
100mbit network, it requires more proccessing at each end, and it
avoids [benign] complaints from gzip about unexpected ends of
input/output streams).
Cheers
Tony