Wednesday, November 28, 2018

Counting Files

A quick bash script to count the number of files in a set of directories:

DIRS=`ls -d */`
for D in $DIRS;
do
  printf "$D "
  find $D -type f|wc -l
done