Don Peterson wrote:

> I use the following shell function as a quick hack to recursively fix
> things: 
> 
> unx ()
> {
>     find . -type d | xargs chmod a+x;
>     find . -type f ! -name "*.exe" | xargs chmod a-x }
> 
> Its problem is that it doesn't work on file names with space
> characters (one could hack on find to add a -Q option to quote any
> filenames with spaces etc. so that hopefully xargs would do the right
> thing).  An undesirable side effect is that e.g. files that are
> scripts where you do want them to be executable are changed to
> nonexecutable. 

FYI and for the archives;
 tips when it comes to space contaminated filenames:

 find -print0 | xargs -null

or maybe better and faster;

 find . -exec chmod a-x \"{}\" \;

Do read man/info pages for more information WRT the above options.

/H
-- 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to