Your favourite UNIX pipe ?

Randal Schwartz merlyn at iwarp.intel.com
Thu May 10 03:29:31 AEST 1990


In article <690 at coma.UUCP>, andy at coma (Andreas Lampen) writes:
|   tar cf - | dd bs=20k | rsh coma "cd blubber; dd bs=20k | tar xf -"

I would use:
	tar cf - . | dd obs=20k | rsh coma "cd blubber && tar xf -"

The second dd contributes nothing.

The "&&" prevents you from extracting a whole mess of stuff in the
wrong directory should you "fat-finger" the target directory.

(Leaving the '.' off the tar sends an empty archive... you gotta send
at least *something*. :-)

I also usually leave off the first dd, because tar writes its stuff
20*512 bytes at a time anyway.

If I'm nosy, it comes out as:

	tar cf - . | rsh coma "cd blubber && tar xvf -"

so I can get a progress report.  Run it in a separate window (GNU
Emacs or bitmap window, take yer pick).

Just another tar baby,
-- 
/=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\
| on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III      |
| merlyn at iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn |
\=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/



More information about the Comp.unix.wizards mailing list