Cheat sheet: find

A list of useful commands involving the find tool.

Empty directories

Identify empty directories below the current directory

find . -type d -empty

Identify empty directories that have do not start with “.git”:

find . -path "./.git" -prune -o -type d -empty -print

See also: here

Leave a Reply