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 :-)
> > 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
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>
--
believing is seeing
[EMAIL PROTECTED]
http://www.forum2.org/gaal/
=================================================================
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]