mail/scripts/rapport_activite.sh

20 lines
466 B
Bash
Raw Normal View History

2022-04-14 13:45:57 +02:00
#!/bin/sh
users_num_robot=13
2022-04-14 13:45:57 +02:00
echo -n "Pre-processing..."
users_num_all=$( ls /home/ | wc -w )
users_num_human=$(( $users_num_all-$users_num_robot ))
size_home=$( du -sh /home | awk '{print $1}' )
size_per_user=$( du -h --max-depth=1 /home | sort -rh )
echo "[done]"
echo "Total number of mailboxes: " $users_num_all
echo "Number of real human mail users: " $users_num_human
echo "Home storage: " $size_home
echo "Users: "
echo $size_per_user | xargs -n 2 echo