July 06, 2011

find command revisited

Finding empty directories and deleting them:
# find /path -depth -type d -empty -exec rm -r {} \;

Finding all gcc coverage files and removing them
find . -name '*gcno' -o -name '*.gcda' -exec rm -f {} \;

Great find command page.

No comments: