| delorie.com/archives/browse.cgi | search |
| X-Spam-Check-By: | sourceware.org |
| From: | "Hannu E K Nevalainen" <_garbage_collector_ AT telia DOT com> |
| To: | <cygwin AT cygwin DOT com> |
| Subject: | RE: Execute bit getting set on created files when it shouldn't |
| Date: | Wed, 21 Dec 2005 21:45:48 +0100 |
| Message-ID: | <JAEBIEIILHAGMJNFODIEAEJICCAA._garbage_collector_@telia.com> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <43A9B2B9.7080809@gdssw.com> |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |