Or if you prefer

    find . -type f | while read i; do xargs chmod "$i"; done

This isn't as robust as null-termination (what if the filename has " in
it?), this idiom is nice to know because it comes in very handy.

On Fri, 20 Jan 2006 at 11:45 -0700, Bryan Sant wrote:
> On 1/20/06, Corey Edwards <[EMAIL PROTECTED]> wrote:
> > To be completely safe you should use null separators to account for
> > files with spaces.
> >
> >         find . -type f -print0 | xargs -0 chmod ...
> >
> > Corey
> 
> Beautiful.  I was about to complain that xargs wasn't a good solution
> (though faster) because it won't handle file names with spaces.  But
> you've just exposed this blissful nugget of truth and made my year.
> 
> Thank you from the bottom of my shoes,
> -Bryan
> 
> /*
> PLUG: http://plug.org, #utah on irc.freenode.net
> Unsubscribe: http://plug.org/mailman/options/plug
> Don't fear the penguin.
> */
> 

-- 
Hans Fugal ; http://hans.fugal.net
 
There's nothing remarkable about it. All one has to do is hit the 
right keys at the right time and the instrument plays itself.
    -- Johann Sebastian Bach

Attachment: signature.asc
Description: Digital signature

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to