On this page I collect useful console hacks, which do not find place elsewhere on this blog.
Change permission of directories/files only
To, e.g. apply recursively 755
permissions to folders, but not files, you can use the find
command:
find /where/to/apply -type d -exec chmod 755 {} +
Completely analog to e.g. apply 644
recursively on files only
find /where/to/apply -type f -exec chmod 644 {} +