This commit is contained in:
parent
61964b3821
commit
a87d30c7a7
|
@ -30,13 +30,19 @@ for i in $d ; do
|
||||||
|
|
||||||
if [ -d "$i" ];then
|
if [ -d "$i" ];then
|
||||||
user=`ls -l $i| tail -n 1|cut -d' ' -f 3`
|
user=`ls -l $i| tail -n 1|cut -d' ' -f 3`
|
||||||
size=0
|
|
||||||
# We grep only mails, not the others files
|
# We grep only mails, not the others files
|
||||||
mails=`find $i -type f | egrep "(^$i)*[0-9]+\.M"`
|
mails=`find $i -type f | egrep "(^$i)*[0-9]+\.M"`
|
||||||
for j in $mails
|
|
||||||
do
|
# This part only count mails size
|
||||||
size=$(( $size + `du -b $j|awk '{print $1}'`))
|
#size=0
|
||||||
done
|
#for j in $mails
|
||||||
|
#do
|
||||||
|
# size=$(( $size + `du -b $j|awk '{print $1}'`))
|
||||||
|
#done
|
||||||
|
|
||||||
|
# This part count the total mailbox size (mails + sieve scripts + ...)
|
||||||
|
size=`du -b -s $i|awk '{print $1}'`
|
||||||
|
|
||||||
mail_count=`echo $mails|wc -w`
|
mail_count=`echo $mails|wc -w`
|
||||||
echo "folder : "$i
|
echo "folder : "$i
|
||||||
echo "mail count : "$mail_count
|
echo "mail count : "$mail_count
|
||||||
|
|
Loading…
Reference in New Issue