[CLUE-Tech] bash - find, xargs, chmod

Warren Raquel clue at sohonetworksetup.com
Thu Nov 21 16:57:55 MST 2002


Try this
find -type d -exec xargs -i chmod 2770 {} \;

At 04:45 PM 11/21/2002 -0700, you wrote:
>OK, I have a large sub-tree of stuph.  I want the directories set as
>2770 (rwx and setgid), and the files set as 2660 (rw and setgid).  So I
>launch the following commands:
>  find -type d | xargs -i chmod 2770 {}
>  find -type f | xargs -i chmod 2660 {}
>
>both lines fail with something like "unmatched single-quote" and sure
>enough, there are folders with names like "CD's" and files with names
>like "Directions to David's house".
>
>I can use this with no problem.
>   chmod -R 2770 *
>
>But I am concerned about making all the files executable...
>
>What's the answer?  Anyone?
>--
>David L. Willson
>MCSE, MCT, A+, Net+, Linux Enthusiast!
>
>_______________________________________________
>CLUE-Tech mailing list
>CLUE-Tech at clue.denver.co.us
>http://clue.denver.co.us/mailman/listinfo/clue-tech




More information about the clue-tech mailing list