[plug] dd </dev/hda >/dev/hdb

Thomas, Andre thomasa at wa.switch.aust.com
Mon Dec 4 14:47:44 WST 2000


Thanks all for your pointers; well appreciated.

-André

-----Original Message-----
From: Peter F Bradshaw [mailto:pfb at users.sourceforge.net]
Sent: Sunday, December 03, 2000 7:40 PM
To: plug at plug.linux.org.au
Subject: Re: [plug] dd </dev/hda >/dev/hdb


On Sat, 2 Dec 2000, Russell Steicke wrote:

> On Sat, Dec 02, 2000 at 12:19:03PM +0800, Peter F Bradshaw wrote:
> ....
> > (cd /; tar -cvpf - --exclude-from /no_copy .) | (cd /mnt/hdb; tar
-xpf -)
> 
> When doing things like this, I find it safer to do
> 
>   (cd / && tar cvfp - ) | ( cd /mnt/hdb && tar xpf -)
> 
> ie replace the ';' with '&&', so the tars will only run if the cds are
> successful.  This prevents tar doing damage in the event of a typo in
one
> of the cd commands.

Yes. Good point.

Cheers

--
Peter F Bradshaw          | http://members.dingoblue.net.au/~pfb
pfb at users.sourceforge.net | PGP public key at
http://www.pfb.tsx.org    |
http://members.dingoblue.net.au/~pfb/public_key.html
ICQ 75431157 (exadios)    | "Needs more salt" - Archimedes





More information about the plug mailing list