knoel99.github.io

Find all files containing a specific string

grep -Ril "text-to-find-here" /

Where:

Recursively counting files in a Linux directory

find . -type f | wc -l

Where:

If you want a breakdown of how many files are in each dir under your current dir:

for i in */ .*/ ; do 
    echo -n $i": " ; 
    (find "$i" -type f | wc -l) ; 
done