3 # counts up the files in each maildir 'cur' folder to find out how many messages are
4 # held in each subdirectory.
6 pushd "$HOME/Maildir" &>/dev/null
8 folderlist=$TMP/zz_folder_list.txt
10 find . -name "cur" >$folderlist
12 while read line; do echo -n "$line -- " ; find "$line" -type f | wc -l ; done < $folderlist
16 # how to sum the totals...
17 # another command perhaps.
18 # bash ~/count_maildir.sh | sed -e 's/.* -- \(.*\)$/\1/' | paste -sd+ | bc