This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: Execute bit getting set on created files when it shouldn't
- From: "Hannu E K Nevalainen" <_garbage_collector_ at telia dot com>
- To: <cygwin at cygwin dot com>
- Date: Wed, 21 Dec 2005 21:45:48 +0100
- Subject: RE: Execute bit getting set on created files when it shouldn't
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/