Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 X-envelope-info: Message-Id: <5.2.1.1.2.20030509143301.06495980@pop.sonic.net> X-Sender: rschulz AT pop DOT sonic DOT net Date: Fri, 09 May 2003 14:36:02 -0700 To: cygwin AT cygwin DOT com From: Randall R Schulz Subject: RE: How to "find" all writable files in a directory tree? In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Igor, At 14:22 2003-05-09, Igor Pechtchanski wrote: >Winston, > >Most of this is off-topic, but why not simply > >find -type f -exec test -w {} \; -print > >? >Or, if you want something more complex, > >find -type f -exec sh -c "test -w {} && echo {}" \; It should be noted that the overhead of this will be pretty high, especially considering how little real work is being done in "-exec" task. If the number of files to examine is at all large, working out the correct self-contained find incantation is quite likely worth the cognitive effort. Also, on the offhand chance that there is a bug lurking somewhere here, it would be good to flush it out. Randall Schulz -- 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/