Sometimes you need to recursively set a specific UNIX permission for a whole set of files and/or directories. And you want to have a different permission for your files and for your directories.

For example, when installing a CMS like Joomla (or Moodle), you might want to recursively set the UNIX permissions to 700 for all the directories contained in your web root (say, your htdocs). And you want to do the same for all the files, but this time to 600.

This can easily be achieved by entering your htdocs and by using the find command: