From owner-freebsd-questions Wed Jun 19 11: 5:32 2002 Delivered-To: freebsd-questions@freebsd.org Received: from snipe.mail.pas.earthlink.net (snipe.mail.pas.earthlink.net [207.217.120.62]) by hub.freebsd.org (Postfix) with ESMTP id 54DE037B407 for ; Wed, 19 Jun 2002 11:05:26 -0700 (PDT) Received: from user-119a2km.biz.mindspring.com ([66.149.10.150] helo=scee.dsj.net) by snipe.mail.pas.earthlink.net with esmtp (Exim 3.33 #2) id 17Kjpc-0006E1-00; Wed, 19 Jun 2002 11:05:24 -0700 Received: from dsj by scee.dsj.net with local (Exim 3.35 #1 (Debian)) id 17Kjpa-0000T0-00; Wed, 19 Jun 2002 14:05:22 -0400 Date: Wed, 19 Jun 2002 14:05:22 -0400 From: "David S. Jackson" To: "David S. Jackson" Cc: Steven Lake , freebsd-questions@FreeBSD.ORG Subject: Re: Determining # of mail's per user Message-ID: <20020619180522.GA1413@scee.dsj.net> Reply-To: "David S. Jackson" References: <20020619150205.GC6184@scee.dsj.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020619150205.GC6184@scee.dsj.net> User-Agent: Mutt/1.3.28i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Jun 19, 2002 at 11:02:09AM -0400 David S. Jackson 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