Recursive chmod all files and directories within the current directory

find . -print -exec chmod 777 {} \;
sometimes if directories are too deep, chmod -R fails... in those cases, a find comes in most handy :)

By: ringlerun
2009-12-23 13:16:31

4 Alternatives + Submit Alt

What Others Think

Use + instead of \; in -exec so that find launches many fewer chmod processes, and will thus run much faster. With \; you launch one chmod process per chmod() system call; that is very expensive.
bwoodacre · 652 weeks and 2 days ago
spaces in filenames will be cause error
unixmonkey7588 · 652 weeks and 2 days ago
spaces won't cause issues... they are properly escaped...
ringlerun · 652 weeks and 2 days ago
Directories related to recursive chmod files in the present directory has been elaborated here. Thanks for sharing this blog page with us. Keep sharing more blog pages like that with us and now students can check novoresume review to complete their work. Things are explained in a very detailed manner here.
BettyStokes · 99 weeks and 6 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: