file permissions

Jason K Larson plug at
Fri Jan 20 13:51:46 MST 2006

Hans Fugal wrote:
> 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.

best of both worlds? null seperated argument list to a quoted list.
find . -type f -print0 | xargs -0ri chmod "{}"


More information about the PLUG mailing list