Gentoo Blog

The ultimate Gentoo Blog
  • Home
  • About

chmod change files or directories recursively to the same value

Simon | February 11, 2010

Recursively change all files in your current working directory including files in subdirectories to 644:

find . -type f -print0 | xargs -0 chmod 644

Recursively change all directories in your current working directory including subdirectories to 755:

find . -type d -print0 | xargs -0 chmod 755

Share on Facebook
Categories
Gentoo, Stuff, Ubuntu/Debian
Comments rss
Comments rss
Trackback
Trackback

« Debian Lenny Possible missing firmware /lib/firmware/bnx2-09-4.0.5.fw for module bnx2 Ubuntu 10.04 Lucid Window Buttons On The Left »

3 Responses to “chmod change files or directories recursively to the same value”

  1. Dinbo says:
    March 19, 2010 at 11:52 am

    chmod -R 644 * also works!

  2. Marcel says:
    May 23, 2010 at 2:29 pm

    yes, but chmod -R doesnt discriminate between files and directories…

  3. Ewoud Kohl van Wijngaarden says:
    May 25, 2010 at 1:44 am

    chmod -R doesn’t make a distinction between files and directories.

    The following is equal to the above commands:

    find -type f -exec chmod 644 {} +
    find -type d -exec chmod 755 {} +

Leave a Reply

Click here to cancel reply.

 

February 2012
M T W T F S S
« Dec    
 12345
6789101112
13141516171819
20212223242526
272829  

Categories

  • confixx/Plesk
  • fun
  • Gentoo
  • iptables
  • mysql
  • news
  • Raid Controllers
  • Stuff
  • Ubuntu/Debian
  • Xen/Vmware

Links

  • Gentoo
  • http.net
  • iphone software linux
  • michael-fuchs.net
  • Ubuntu
  • webupd8.org

Search Blog

rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox