« Back to blog

Change permissions on all directories except SVN with the command line?

OK, a quick one. Want to set permissions on all directories except .svn ones?

So, working from your current directory down, let's say you want to make all directories writeable, and leave the svn ones alone:

find . -type d -not -name ".svn" | xargs chmod 0777

Or, if you need to exclude several directory types, you could arrange it a little bit differently:

find . -type d -print | grep -v '\(\.svn\|modules\)' | xargs chmod 0777

Posted July 23, 2010