----- Forwarded message from Adi Stav <[EMAIL PROTECTED]> -----

Date: Thu, 23 Mar 2000 21:00:21 +0200
To: Gaal Yahas <[EMAIL PROTECTED]>
Subject: Re: dd
User-Agent: Mutt/1.1.5i
From: Adi Stav <[EMAIL PROTECTED]>

On Thu, Mar 23, 2000 at 06:48:38PM +0300, Gaal Yahas wrote:
> On Thu, Mar 23, 2000 at 01:24:15PM +0200, Adi Stav wrote:
> > >   tar cf - . | (cd /target ; tar xvf -)
> > 
> > You can also use the -C flag to specify the directory (I don't know if
> > it's GNU-specific) to make it easier:
> > 
> > tar cf - -C sourcedir | tar xvf - -C targetdir
> 
> Oh, that's ugly :-)

I see your point :)
 
> > > Hmmm, anyone care to patch GNU cp to accpet - as either source or
> > > destination? This is not a trivial change, of course, as it should
> > > work more like a directory than like a file.
> > 
> > Just use proc.
> > 
> > cp file /proc/self/fd/0 
> > 
> > is equivalent to cat.
> > 
> > You can also use /proc/self/fd/2 if you want the file to go to error
> > and so on. Unless I did not understand exactly what you meant.
> 
> Say you want to back up your machine completely onto another.
> 
>       backup% nc -l -p 12345 > host.raw
>     host%   dd if=/dev/hda | nc backup 12345
> 
> If host gets messed up, boot a rescue diskette on it, set up the
> network, and do:
> 
>       host%   nc -l -p 12345 | dd of=/dev/hda
>       backup% dd if=host.raw | nc host 12345

Hmm... Can't find any nc command on either a Red Hat or a Debian
system. Looks pretty cool though. Now... I can't try rsh on this
network here, but how about:

host% dd if=/dev/hda1 | rsh backup "dd of=host.raw" 

> The degree by which you could trust cat or cp is unknown to me. In
> these cases, I still use dd for something else than in vi <g>

Trust?
 

> -- 
> believing is seeing
> [EMAIL PROTECTED]
> http://www.forum2.org/gaal/

        - Adi Stav


----- End forwarded message -----

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to