Re: Extract last email from an email file (mbox format)
"Julian H. Stacey" <[email protected]> Wed, 25 May 2016 14:24:50 +0200
| Newsgroups | gmane.mail.procmail |
|---|---|
| Organization | http://berklix.eu BSD Unix Linux Consultants, Munich Germany |
| Message-ID | <[email protected]> |
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 ;-) 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/