Skip to main content
1 of 4
GWu
  • 283
  • 1
  • 2
  • 7

How to delete a range of mails in Solaris using the 'mail' command?

I have some 1k+ mails in an inbox (old cronjob stdout), how to delete them in bulk?

I'm on Solaris 8 and I have only mail available, no pine or mutt or similar "UI"-based client.

Inline help and man page only give "d #" to delete a specific mail. I've tried for example d 1 - 100 but not luck. And I don't feel like doing d 1000 times...

Any ideas how to clean up this inbox? I'd actually like to purge all mails older than x days.

GWu
  • 283
  • 1
  • 2
  • 7