delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/05/09/17:39:43

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Fri, 9 May 2003 17:39:28 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Randall R Schulz <rschulz AT sonic DOT net>
cc: cygwin AT cygwin DOT com
Subject: RE: How to "find" all writable files in a directory tree?
In-Reply-To: <5.2.1.1.2.20030509143301.06495980@pop.sonic.net>
Message-ID: <Pine.GSO.4.44.0305091737370.9872-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

Randall,

I was not providing the correct way to solve the original problem, I was
correcting Winston's statement that you needed a separate script.
Personally, I'd use the -perm invocation in this particular case...
	Igor
P.S. Bug?  What bug? ;-)

On Fri, 9 May 2003, Randall R Schulz wrote:

> Igor,
>
> At 14:22 2003-05-09, Igor Pechtchanski wrote:
> >Winston,
> >
> >Most of this is off-topic, but why not simply
> >
> >find <dir> -type f -exec test -w {} \; -print
> >
> >?
> >Or, if you want something more complex,
> >
> >find <dir> -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

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Knowledge is an unending adventure at the edge of uncertainty.
  -- Leto II


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019