Re: Extract last email from an email file (mbox format)
Xu Wang <[email protected]> Wed, 25 May 2016 15:40:14 -0400
| Newsgroups | gmane.mail.procmail |
|---|---|
| Message-ID | <CAJhTkNinbndHWH670vva1EMM2Nw3wRcJURQ2DZUYKwn3HVcVuA@mail.gmail.com> |
On Wed, May 25, 2016 at 8:24 AM, Julian H. Stacey <[email protected]> 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. > > There'll be other more efficient solutions ;-) Good questions. I did not clearly define. I apologize for lacking of clarity. I really used the word efficient just to mean "I hope it takes not longer than one second considering I have a huge (1GB) mbox file." Kind regards, Xu