Useful find Commands

Jun 23, 2011

I'll be honest, I find man pages rather boring, and rather than reading the man page for find, I always search google for the commands I need. Every time I need to use a find command, I will index it below for my reference later.

Recursively search your directory tree starting at . (dot) and chmod all the folders to 755.

find . -type d -exec chmod 755 {} \;

Recursively search your directory tree starting at . (dot) and chmod all the files (ignoring folders) to 644.

find . -type f -exec chmod 644 {} \;

Do you have any useful find commands? Please share below!