X-Spam-Check-By: sourceware.org From: "Hannu E K Nevalainen" <_garbage_collector_ AT telia DOT com> To: Subject: RE: Execute bit getting set on created files when it shouldn't Date: Wed, 21 Dec 2005 21:45:48 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit In-Reply-To: <43A9B2B9.7080809@gdssw.com> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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/