We usually use chmod to change the permission of a file and or folder on Linux/Mac. When we chmod a directory recursively it also changes it's subdirectories and the files inside it to same permission.

The issue arises because we may not need the same permission for the files as like the directories. Take a website as example. Generally website files have 644 permission and directories have 755 permission.

If you have a little number of files and directories then it's okay for you to change the permissions manually per file or directory. But what about 1000s files and directories? What will you do then?

Hold on man, we are *nix users. We must have a solution!

And yes, we have a great tool called "find". You can easily look for the files or folders recursively and change the permission at a rapid mode with this tools.

I use this command to change the permission of directory only and recursively.

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

And this command for changing the permission of files only and obviously recursively.

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

You may do the tweaks as needed.

Not only this, you can do a lot of other things with the combination of "find" and "xargs". Find the possibilities of "find" with the commands below:

man find
man xargs

What's on your mind?


bangaloreinterio.com commented about 18 hours ago

Touche. Sound arguments. Keep up the great spirit.

csgo skins for sale commented about 16 hours ago

Greetings! I've been reading your weblog for some time now and finally got the courage to go ahead and give you a shout out from Atascocita Texas! Just wanted to mention keep up the good work!

Orville commented 3 days ago

Hmm is anyone else encountering problems with the images on this blog loading? I'm trying to determine if its a problem on my end or if it's the blog. Any feed-back would be greatly appreciated.


Thanks for the good writeup. It if truth be told used to be a entertainment account it. Glance complex to more added agreeable from you! By the way, how can we communicate?


Hi there, I want to subscribe for this blog to take most up-to-date updates, thus where can i do it please help.

http://benlambpoker.com/ commented about 19 hours ago

Link exchange is nothing else but it is simply placing the other person's blog link on your page at proper place and other person will also do similar for you.

cs go weapon skin betting commented 3 days ago

Wow! In the end I got a web site from where I know how to truly obtain useful data regarding my study and knowledge.

csgo skins price list commented 4 days ago

Incredible story there. What happened after? Take care!

Jeanette commented 4 days ago

If some one wants expert view on the topic of blogging and site-building then i advise him/her to pay a quick visit this webpage, Keep up the nice work.

giuseppe zanotti outlet commented about 1 month ago

The original version of the heel of high tops is flat; at present, high-heeled versions are marketable and more engaging to teenagers. The footwear industry is very defined; and there are no stylish and trendy options for young individuals. Finding a balance to compliment your outfit is key.