[Alpine-info] Problem with Alpine - mbox larger than 2GB
Mike Miller
mbmiller+l at gmail.com
Wed Sep 29 17:11:27 PDT 2010
On Wed, 29 Sep 2010, Vincent Poy wrote:
> Does anyone know what might be wrong and is there any other command
> based mail clients or tools I can use to get the file to 3x 1GB files
> but with the files, it will actually end at the end of a message instead
> of chopping it off partially? Thanks!
I'd get a list of the line numbers where messages begin by using grep like
this:
grep -nE '^From ' vince.old > vince_lines.txt &
That will take a little while. This would be a better string to match,
but slower and not much better:
^From \S+\s+\S+\s+\S+\s+\d+\s+\d+:\d+:\d+\s+\d+
Anyway, you can then decide where to cut up the file. Suppose you want to
make the cuts at the messages beginning at lines 10000000 and 20000000,
then you'd do this:
head -9999999 vince.old > vince.1 &
tail -n+10000000 vince.old | head -19999999 > vince.2 &
tail -n+20000000 vince.old > vince.3 &
You would have to have enough disk space for this, of course. I think
these GNU utils are up to the task -- I have used them on files as large
as 42 GB (not mbox files!), but on a 64-bit Linux box.
Mike
More information about the Alpine-info
mailing list