On Fri, Feb 02, 2001 at 09:53:20AM -0500, rpjday <[EMAIL PROTECTED]> wrote:
| On Sat, 3 Feb 2001, Matthew Melvin wrote:
| > For this we can simplify it alot and get find to do all the work for us...
| >     find . -type d -exec chmod 2770 {} \;
| > ... and because the file name is never passed throug shell we don't have to
| > worry about any spaces.
| 
| you might also consider using "xargs" to avoid having to run a separate
| chmod command for every single directory you locate.

Of course, xargs is prone to quoting bugs of its own... Certainly it's blown
up on me several times with spaces and quotes in filenames. Because it
passes things to the shell :-(

So you want:

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

GNU find and GNU xargs (which are what you will be using on Linux) have these.
And probably do the Right Thing and go fork/exec instead of using system()
like the xargs on Solaris...
-- 
Cameron Simpson, DoD#743        [EMAIL PROTECTED]    http://www.zip.com.au/~cs/

I was moving so fast I started using Him as a braking marker.
        - motorcyclist test pilot



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to