Something I've needed to do continuously is change permissions on directories or files only recursively on a linux / unix box. I'm sure just about every sysadmin has needed to do this sometime in their lives. Well, the most elegant way I could think of is to do the following: For directories only: find /location -type d -exec chmod 775 {} \; The above example does the following:
find /location -type f -exec chmod 664 {} \; The above example does the following:
Comments Your comment will be posted after it is approved. Leave a Reply | AuthorAlan Johnson is the proprietor of OKES IT Consulting Services. Having 15+ years technical experience in the IT industry positions OKES IT Consulting Services in a very good position to cover all aspects of IT infrastructure from desktops to servers to networks and everything in between, and beyond! ArchivesSeptember 2011 Categories |

RSS Feed