Obsolete Releases > SME 8.x Contribs
Mailbox size contrib?
Drifting:
Hi Chaps.
Anyone aware of a simple contrib that would indicate to the local admin or user how much email they are storing? Did a brief google on here but most of the info that came up related to version 7, and currently I run most 8.x
P
Stefano:
mmmhhh..
something like
--- Code: --- du -s -m /home/e-smith/files/users/*/Maildir | sort -n -r
--- End code ---
in cron?
--- Code: ---7827 /home/e-smith/files/users/tania/Maildir
6183 /home/e-smith/files/users/roberto/Maildir
2910 /home/e-smith/files/users/gianni/Maildir
499 /home/e-smith/files/users/archivio/Maildir
2 /home/e-smith/files/users/assistenza/Maildir
1 /home/e-smith/files/users/spam/Maildir
1 /home/e-smith/files/users/riunioni/Maildir
1 /home/e-smith/files/users/notspam/Maildir
1 /home/e-smith/files/users/michele/Maildir
1 /home/e-smith/files/users/laura/Maildir
1 /home/e-smith/files/users/katia/Maildir
1 /home/e-smith/files/users/chiara/Maildir
--- End code ---
Drifting:
Brilliant thank you so much, wished I understood more command line. Note duly made for later use.
Regards P
Stefano:
--- Quote ---du(1) - Linux man page
Name
du - estimate file space usage
Synopsis
du [OPTION]... [FILE]...
du [OPTION]... --files0-from=F
Description
Summarize disk usage of each FILE, recursively for directories.
-s, --summarize
display only a total for each argument
-m
like --block-size=1M
--- End quote ---
and
--- Quote ---sort(1) - Linux man page
Name
sort - sort lines of text files
Synopsis
sort [OPTION]... [FILE]...
sort [OPTION]... --files0-from=F
Description
Write sorted concatenation of all FILE(s) to standard output.
-n, --numeric-sort
compare according to string numerical value
-r, --reverse
reverse the result of comparisons
--- End quote ---
HTH
ReetP:
Or :
du -h -s /home/e-smith/files/users/*/Maildir | sort -n -r
If you want a human readable format :-)
(ha - quick edit to point out that this doesn't appear to sort correctly. Bug in DU with Gb ?)
Alternatively how about :
http://wiki.contribs.org/Durep
http://wiki.contribs.org/Diskusage (old - use with care)
Typical Stefano - only does half the job ;-)
B Rgds
John
Navigation
[0] Message Index
[#] Next page
Go to full version