hans at fugal.net
Fri Jan 20 12:25:12 MST 2006
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 <tensai at zmonkey.org> 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,
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://plug.org/pipermail/plug/attachments/20060120/06bd6528/attachment.bin
More information about the PLUG