Welcome to WebmasterWorld Guest from

Forum Moderators: bakedjake

Message Too Old, No Replies

Grep size of email accounts

fedora - qmail



10:19 am on May 25, 2007 (gmt 0)

5+ Year Member

Hi,i onced used a command line to show the list of email accounts which used the most disk space...that was on a redhat/sendmail setup . i lost the command line query...but i know grep command is involved.

now i have a qmail/fedora setup - mind if anyone could give me the command line to show which accounts are taking up the most space.cause my server is running low on space.


12:56 pm on Jun 2, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

hi bicycling,

list the mail folder (where your inboxes are kept) pipe to awk which prints only the 5th column (which on my system is the size of each mailbox) then pipe to sort, which sorts by size

ls -l /var/mail/ awk '{print $5}' sort


(you'll have to replace the with proper pipes)


12:40 am on Jun 3, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Try this to see the username also:
ls -lL /var/mail awk '{print $5, $9}' sort -n

The -L is in case your /var/mail is a symlink, and the -n does a numerical sort rather than an ascii sort.


Featured Threads

Hot Threads This Week

Hot Threads This Month