[buug] disk clone

f.johan.beisser jan at caustic.org
Sat Nov 9 12:27:13 PST 2002


On Sat, 9 Nov 2002, Rob Helmer wrote:

> --
> cd /mnt
> tar -cp "(directories)" | tar -x
> --

in gnu tar you can explicitly exclude directories. so make the tar command
use "tar -cp "dir" -X /mnt | tar -xv" instead.

> This is somewhat lazy in that most other versions of tar would
> require something like "tar -cpf - '(dirs)' | tar -xf -", you
> have to specify stdin/out explicitly as "-".

habit forces me to be explicit.

some variations i've found useful:

	tar cf - <foo> | ssh <user at host> tar xvf - -C <dest dir>

	tar cf - . | (cd /to/some/dir ; tar xvf -)

-------/ f. johan beisser /--------------------------------------+
  http://caustic.org/~jan                      jan at caustic.org
	"Champagne for my real friends, real pain for
	  my sham friends." -- Tom Waits




More information about the buug mailing list