20 lines
466 B
Bash
20 lines
466 B
Bash
|
#!/bin/sh
|
||
|
users_num_robot=12
|
||
|
|
||
|
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
|