On 08:33 17 Jul 2003, Kelerion <[EMAIL PROTECTED]> wrote:
| I'm trying to find out how many emails I have stored in various 
| "personal folders" in mozilla's email..
| is there a way to count them? I've had a look but can't find anything 
| obvious other than doing a "Search Messages" and searching for every 
| email where the sender contains an "@" sign.. not very quick or 
| efficient..especially as I now have over 100,000 emails stored..

Cd to the directory holding the Mozilla email. Mozilla stores them as
standard UNIX mail files, so:

        grep '^From ' mailfile | wc -l

will count every line beginning with a "From ", which is the start-of-message
marker for those files. So in that folder:

        for mailfile in *
        do  echo -n "$mailfile: ";
            grep '^From ' "$mailfile" | wc -l
        done

should be a good first cut. Note that this will probably also count
"deleted" messages if you haven't used the "compact folders" button
(which rewrites mail files without the deleted messages).

Cheers,
-- 
Cameron Simpson <[EMAIL PROTECTED]> DoD#743
http://www.cskk.ezoshosting.com/cs/

As your attorney, it is my duty to inform you that it is not important that
you understand what I'm doing or why you're paying me so much money. What's
important is that you continue to do so.
        - Hunter S. Thompson's Samoan Attorney


-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to