Cheat Sheet - Shell Dojo

Count the number of lines in a directory

This is useful, e.g., to generate some basic statistics for a code repository.

find . -type f -name "*.cs" -exec wc -l {} + | tail -n 1