On Fri, Mar 13, 2009 at 01:56:22PM +0000, MJ Ray wrote:
Chris G cl@isbd.net wrote:
Can anyone suggest a neat/easy way to keep only (say) the last seven days of messages in an incoming mail spool?
Install Heirloom mailx, then date -d '7 days ago' '+d (before %d-%b-%Y)' | mailx -f path/to/mbox
Replace mailx with nail for older versions of debian and ubuntu, but I'm not sure in which version the () style of selection appeared.
Excellent, thanks, that looks like just what I need.