I'm backing up my DVD's to DVD+R. Many of them are DVD-9's (9GB) and don't fit on a single DVD+R (4.38GB). What I'd like to do is take an image of the DVD-9, split it in half. Put each half on a DVD+R and fill the extra space on each DVD+R with PAR data.
1) This is pretty sound practice, right?
2) What's a good file splitter? There are plenty of proprietary file splitters out there, but most are designed for floppies. You can specify a split size, but I want to just split in half. I guess I could do the math myself. I just want a splitter that uses a fairly common format and optionally, can split files in half.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
a) any decent file splitter should just split
and not add any header crap.
b) on unix/linux I'd do the "split in half" about like this:
#!/bin/sh
if test "$1" = "";
then
echo "split file into two equal size pieces"
echo "usage: $0 file [prefix for parts]";
else
MYFILESIZE=`ls -l $1|awk '{print $5 }'`
# expr rounds down at dividing (2000 / 1024 = 1), so work around that.
MYROUNDFIX1=`expr $MYFILESIZE "+" 1023`
MYFILESIZEKB=`expr $MYROUNDFIX1 "/" 1024`
# using kilobyte, since expr's counting wraps around at 2 * 1024 * 1024 * 1024
MYROUNDFIX2=`expr $MYFILESIZEKB "+" 1`
MYHALFSIZE=`expr $MYROUNDFIX2 "/" 2`
if test "$2" = "";
then
split -b ${MYHALFSIZE}k $1 $1".";
else
split -b ${MYHALFSIZE}k $1 $2;
fi;
fi
Marco van Loon
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
- kilobytes: expr's arithmatic operations seems to
'wrap around/overflow' if the value gets over 2 * 1024 * 1024 * 1024 ... :(
(you get a negative number then...)
- putting it back together: cat in unix or copy /b in DOS/Windows.
AFAIK one of the most popular filesplitters for
windows is Mastersplitter, but I don't know if
it supports something like "split in half"...
(though if you can find a simple commandline filesplitter
and have 4DOS/4NT installed, I think I can whip up
a 4DOS/4NT batch file that does the "calculate half the filesize" stuff and feeds that to the splitter... ;) )
Marco van Loon
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm backing up my DVD's to DVD+R. Many of them are DVD-9's (9GB) and don't fit on a single DVD+R (4.38GB). What I'd like to do is take an image of the DVD-9, split it in half. Put each half on a DVD+R and fill the extra space on each DVD+R with PAR data.
1) This is pretty sound practice, right?
2) What's a good file splitter? There are plenty of proprietary file splitters out there, but most are designed for floppies. You can specify a split size, but I want to just split in half. I guess I could do the math myself. I just want a splitter that uses a fairly common format and optionally, can split files in half.
a) any decent file splitter should just split
and not add any header crap.
b) on unix/linux I'd do the "split in half" about like this:
#!/bin/sh
if test "$1" = "";
then
echo "split file into two equal size pieces"
echo "usage: $0 file [prefix for parts]";
else
MYFILESIZE=`ls -l $1|awk '{print $5 }'`
# expr rounds down at dividing (2000 / 1024 = 1), so work around that.
MYROUNDFIX1=`expr $MYFILESIZE "+" 1023`
MYFILESIZEKB=`expr $MYROUNDFIX1 "/" 1024`
# using kilobyte, since expr's counting wraps around at 2 * 1024 * 1024 * 1024
MYROUNDFIX2=`expr $MYFILESIZEKB "+" 1`
MYHALFSIZE=`expr $MYROUNDFIX2 "/" 2`
if test "$2" = "";
then
split -b ${MYHALFSIZE}k $1 $1".";
else
split -b ${MYHALFSIZE}k $1 $2;
fi;
fi
Marco van Loon
That sounds pretty good. But why do all the conversion to kilobytes when you can just specify -b in bytes?
How would I splice them back together? cat?
Is there a solution in Windows? Since my burner is on a Windows machine, it'd be more convenient.
- kilobytes: expr's arithmatic operations seems to
'wrap around/overflow' if the value gets over 2 * 1024 * 1024 * 1024 ... :(
(you get a negative number then...)
- putting it back together: cat in unix or copy /b in DOS/Windows.
AFAIK one of the most popular filesplitters for
windows is Mastersplitter, but I don't know if
it supports something like "split in half"...
(though if you can find a simple commandline filesplitter
and have 4DOS/4NT installed, I think I can whip up
a 4DOS/4NT batch file that does the "calculate half the filesize" stuff and feeds that to the splitter... ;) )
Marco van Loon
Windows Commander has a handy splitter in it's File Menu.
http://www.ghisler.com/
You might like it for other reasons too.
Check out Dar (dar.sf.net) which creates "slices" of a backup, and also works with Parchive.
Use SaraB (sarab.sf.net) if you want to do cool rotations of your backups, which uses Dar and very soon will support Parchive.
Tristan Rhodes