Recursive change of file permissions and attributes

ratpoison_logo-60

This is just quick sequel to previous post:
#changing directory permissions to 755
find . -depth -type d -name '*' -execdir bash \-c 'a="{}";chmod 755 -f "$a"' \;

#changing file permissions to 644
find . -depth -type f -name '*' -execdir bash \-c 'a="{}";chmod 644 -f "$a"' \;

…of course you must be root to do so…
Happy New Year!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s