Re: Extract last email from an email file (mbox format)
udi M <[email protected]> Wed, 25 May 2016 16:25:38 +0300
| Newsgroups | gmane.mail.procmail |
|---|---|
| Organization | tau |
| Message-ID | <[email protected]> |
On 25/05/16 15:24, Julian H. Stacey wrote: > Hi, Reference: >> From: "Ruud H.G. van Tol" <[email protected]> >> Date: Wed, 25 May 2016 09:38:44 +0200 > "Ruud H.G. van Tol" wrote: >> On 2016-05-25 08:12, Xu Wang wrote: >> >>> Hi how can I efficiently extract the last email in a huge mbox email file? >> If you need this more than once, I would switch to maildir first. > It was Xu's word "efficiently" that put me off replying earlier: > - efficient in reducing cpu processor time ? Or run time ? > - efficient in minimising transient max disc used ? Or > - efficient in human time ? > not searching new tools or reading manuals if for a one off job > & a solution already known, even if cludgy ? > > I'd cludge it with my > http://berklix.com/~jhs/src/bsd/jhs/bin/public/mailsplit/ > & if the mbox was truly monstrous & I was about to run out of space, either: > - first dd toward the end of mega mbox. > - or periodically delete numerous output files, either: > - by suspending job > - or using another xterm in same dir. What I do for splitting: 1) cat little.rc :0 mydir/ 2) formail -s procmail ./little.rc < theBigBox But, maybe your program is faster? --udi > > There'll be other more efficient solutions ;-) > > Cheers, > Julian > -- > Julian Stacey, BSD Linux Unix Sys Eng Consultant Munich http://berklix.eu/jhs/ > Mail plain text, No quoted-printable, HTML, base64, MS.doc. > Prefix old lines '> ' Reply below old, like play script. Break lines by 80. > Britain denies 700,000+ Brits in EU a vote. http://www.berklix.eu/brexit/ > ____________________________________________________________ > procmail mailing list Procmail homepage: http://www.procmail.org/ > [email protected] > http://mailman.rwth-aachen.de/mailman/listinfo/procmail