7-zip will extract the part of a file from a multi-part rar, and then you can stitch them back together with dd. For example, if you have the first and last rar-parts:
7z x p1.rar
mv dir p1 # rename out of the way
7z x plast.rar
unrar l p1.rar
# note the file size of the entire file
ls -l dir/file # note the size of the last part
dd if=dir/file of=p1/file conv=notrunc bs=1 seek=$((full_size - lastpart_size))
If the offset you need to seek to isn't prime, then use a block size larger than one. dd
can only seek
to multiples of the output block size. dd
really does make read
and write
system calls with that block size, so bs=1
really sucks.
A large ibs
(input block size) would save half the CPU time, since seek
is in units of obs
(output block size). Or maybe there's some other tool which can seek to an arbitrary byte position and then do normal-sized I/Os. Or if you were scripting this, you could dd with bs=1
up to 32k-aligned, then maybe tail -c +$misalignment lastpart/file | dd ... of=p1/file conv=notrunc bs=32k seek=$(( (full_size - lastpart_size + misalignment) / (32 * 1024) ))
So did you find a solution, and share with us? – davidbaumann – 2015-12-07T20:00:10.513
1obviously, you need the whole thing, its not going to work otherwise – Sickest – 2014-01-30T23:23:38.567
1Well, he does say he wants "as much as possible". However, it is highly likely that whatever he extracts will not be usable, unless it's a simple file format (bitmap?). – WindowsEscapist – 2014-01-30T23:37:47.593
If there's another archive inside which contains many files, he might be able to recover some of the files. The trick is just to make WinRar extract as much as possible. – davidbaumann – 2014-01-30T23:43:02.933
2I don't understand why people vote down questions, just because they don't understand. – davidbaumann – 2014-01-30T23:43:31.497