[wplug] Script to check mailbox size
Tom Rhodes
trhodes at FreeBSD.org
Thu Aug 7 19:05:31 EDT 2008
On Thu, 7 Aug 2008 10:42:45 -0600 (MDT)
Vance Kochenderfer <vkochend at nyx.net> wrote:
> Vance Kochenderfer <vkochend at nyx.net> wrote:
> > This command generates a list of usernames whose mbox file
> > exceeds 80MB and feeds it to our script:
>
> Ah, thought of a couple more things to consider. Certain shells
> may have a limit on the number of parameters that can be passed
> to a script (don't know for sure whether this is the case). You
> can limit this with the -n option to xargs. Also, if you want to
> exclude certain mailboxes (e.g., system mailboxes like root, ftp,
> daemon, etc.) you can add egrep to the pipeline for that:
>
> find /usr/spool/mail -follow -type f -size +83886080c -exec basename \{\} \; | egrep -v 'root|bin|daemon|ftp' | xargs -n 9 /path/to/quotamail.sh
Hey now, I'm the resident POSIX (read annoying) guy around here.
And you're right. You don't know annoyed I was to first learn
this. :P
--
Tom Rhodes
More information about the wplug
mailing list