homepage Welcome to WebmasterWorld Guest from 107.21.163.227
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Website
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




msg:3349540
 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




msg:3356644
 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




msg:3356997
 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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved