Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jun 2002 14:05:22 -0400
From:      "David S. Jackson" <deepbsd@earthlink.net>
To:        "David S. Jackson" <deepbsd@earthlink.net>
Cc:        Steven Lake <raiden@shell.core.com>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Determining # of mail's per user
Message-ID:  <20020619180522.GA1413@scee.dsj.net>
In-Reply-To: <20020619150205.GC6184@scee.dsj.net>
References:  <Pine.GSO.4.44L0.0206161529060.22536-100000@shell.core.com> <20020619150205.GC6184@scee.dsj.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 19, 2002 at 11:02:09AM -0400 David S. Jackson <deepbsd@earthlink.net> wrote:
> > problem on one of the mail servers and I want to create a simple formatted
> > output that I can put into a spreadsheet program and view who are the
> > biggest offenders.  I could do it by mail file sizes, but to the less
> > experienced telling them they have 150 megs of email on the server doesn't
> > make as big an impact as saying they have 25,000 emails just sitting there
> > idle and taking up space.  Plus it gives me some tangeble numbers to put
> > in the records.
> 
> forspreadsheet=/tmp/spreadsheet.$$
> 
> if [ -e $forspreadsheet -a -w $spreadsheet ]; then 
>   rm $forspreadsheet

add a 

touch $forspreadsheet

here

> fi
> 
> cd $maildir 
> for i in *; do
>   size=`du $i | cut -d' ' -f1`
>   num=`grep 'From:' $i | wc -l`
>   line=`echo -e $i\t$num\t$size\n`
>   cat $line >> $forspreadsheet

^cat^echo

err, substitute echo for cat

> done  
>   



-- 
David S. Jackson                        dsj@dsj.net
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
For my birthday I got a humidifier and a
de-humidifier...  I put them in the same room and
let them fight it out.  -- Steven Wright

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020619180522.GA1413>