[Mailman-Users] Amount of messages in a .mbox file

Jon Carnes jonc at nc.rr.com
Thu Sep 19 04:00:53 CEST 2002


Just to be on the safe side I use:
  grep -c ^"From " <listname>.mbox

To separate them by Month use something like:
  grep ^"From " <listname>.mbox |grep -c " Mar "

The months are: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov,
Dec.

Good Luck

Jon Carnes

On Wed, 2002-09-18 at 19:30, Moz wrote:
> Danny wrote:
> 
> > I have a .mbox file of 890Mb in size. I want to know how many
> >messages are in it and how much messages per month.  Can someone help
> >me to write a shell script?
> 
> Each message starts with a line like "From mailman-users at python.org",
> so you can just count those. Divide by months in file to get messages/
> month.
> 
> grep -c "From <list>" <file>
> 
> For the mailman archive, this works:
> 
> grep -c -i "From mailman-users at python.org" mailman-users.mbox
> 
> After some thrashing, the number is:
> 
> C:\docs>grep -c "From mailman-users" mailman-users.mbox
> File mailman-users.mbox:
> 2721 lines match
> 
> The space is important: lots of header lines have "From: ..."
> 
> Moz
> 
> 
> ------------------------------------------------------
> Mailman-Users mailing list
> Mailman-Users at python.org
> http://mail.python.org/mailman/listinfo/mailman-users
> Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
> Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/






More information about the Mailman-Users mailing list