We got a winner!!!!
10X for the help!
Gili

Subject:  Re: DD and split problem (need ideas)....
Date:  Tue, 2 May 2006 12:14:32 +0300
On Tue, 2 May 2006 18:35:25 +1000, Amos Shapira wrote: > On 5/2/06, gili gili wrote: > > > > I know I can use "split" command. But the restore is problematicÂ… > > cat backup.img.gz.* | gzip -dc | dd of=/dev/hda1 > > But if I change the DVD to the one that have the new image, cat will "lose > > count"Â… > > Untested idea: > > 1. "mkfifo fifo" > 2. do "cat fifo fifo fifo... | gzip...". repeat "fifo" on the cat > command line to the > number of input DVD's. > 3. dd from the dvd's into "fifo", one at at time. > > The repating of "fifo" is required because every time "dd" closes the fifo cat > gets an EOF. You overcome this by telling cat that its next file to read is > (tararam...): fifo.

The above should work but you need to know the number of DVDs (or to use many fifo, so it is always sufficient).

Instead you can use subshell (tested) like this:

( FLAG=any while [ $FLAG ] do cat /DVD-MOUNT-DIR/backup.img.gz.* echo "Please put next DVD and press Y + Enter" > /dev/tty echo "If there is none, press Enter only" > /dev/tty read FLAG < /dev/tty done ) | gunzip -c | dd of=/dev/hda1

You can do any other needed operation in the loop (like unmounting and mounting the new DVD).

Ehud.


--
Ehud Karni Tel: +972-3-7966-561 /"\ Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign Insurance agencies (USA) voice mail and X Against HTML Mail http://www.mvs.co.il FAX: 1-815-5509341 / \ GnuPG: 98EA398D Better Safe Than Sorry

================================================================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]




=================================================================
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