Using commands recursively with find

I copied my home folder to Windows for a backup and when I copied them back for some weird reason all the directories had executables privileges.

This is what I did to get rid of it recursively

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

you can pass any command as an argument to -exec. Some useful things that you can do with find are here

No comments: