Q. I would like to show the list of email accounts which used the most disk on my Linux mail server. How do I find out size of email account?
A. Usually mail is stored in /var/mail directory. By running the following command you can get list of email account disk size.
ls -lL will display user filesize.
Use awk command to print user mailbox size along with username
Finally sort command will sort mailbox size.
Type the command:
$ ls -lL /var/mail | awk '{print $5, $9}' | sort -rn
OR
$ ls -lL /var/mail | awk '{print $5, $9}' | head -10
(adsbygoogle = window.adsbygoogle || []).push({});