Fixing permissions with find "the quick way"

Probably I'm not the only one having to fix some permissions on an entire tree and being annoyed by the fact that, normally, you have to run it twice: one time to fix the file permissions and second time to fix folder permissions:

    find /path -type d -exec chmod 755 {} \;  
    find /path -type f -exec chmod 644 {} \;

This is not only annoying, but also really slow. For every match from find you run chmod, and then to add insult to injury, you run it again. Fortunately, there's also a quick way to do it:

    chmod -R a+rX /path

where X means "execute/search only if the file is a directory or already has execute permission for some user". And most of the time, that's exactly what you need. Shorter to type and faster to run.

But... but... why?

So I decided to have a tech blog. Why oh why, you may ask, aren't there already millions of tech blogs on the mighty internet? Yes, there are. But sometimes I feel the need to share this awesome thing I just found. Sometimes I just have to take a note of it, so I won't forget. After all, I might need it again in a couple of years. And sometimes... well... I'm just bored.

Let's see how it goes.