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

David Willson dlwillson at thegeek.nu
Thu Nov 21 16:45:32 MST 2002


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!




More information about the clue-tech mailing list