homepage Welcome to WebmasterWorld Guest from 54.204.73.126
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Grep size of email accounts
fedora - qmail
bicycling

5+ Year Member



 
Msg#: 3349538 posted 10:19 am on May 25, 2007 (gmt 0)

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.

 

jamie

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 3349538 posted 12:56 pm on Jun 2, 2007 (gmt 0)

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

hth

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

mcavic

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 3349538 posted 12:40 am on Jun 3, 2007 (gmt 0)

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved