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

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
Date: Fri, 9 May 2003 17:44:32 -0400 (EDT)
From: lists AT m8y DOT org
X-X-Sender: nemo AT nautilus DOT m8y DOT org
To: Cygwin <cygwin AT cygwin DOT com>
Subject: RE: How to "find" all writable files in a directory tree?
In-Reply-To: <EBEMJMPFEOOPGHBJFKGPKEAPFBAA.winston.gutkowski@eztext.com>
Message-ID: <Pine.LNX.4.53.0305091742400.19116@nautilus.m8y.org>
References: <EBEMJMPFEOOPGHBJFKGPKEAPFBAA DOT winston DOT gutkowski AT eztext DOT com>
MIME-Version: 1.0

-perm +222 is redundant

-perm +mode
    Any of the permission bits mode are set for the file.

-perm -222 is equivalent to -perm +2


On Fri, 9 May 2003, Winston Gutkowski wrote:

> I believe you need to use
> find <dir> -perm +222 -ls
> 
> Alternatively, put the following command:
> test -w $1 && echo $1
> 
> into a file, make it executable, and try
> 
> find <dir> -exec <file> {} \;
> 
> HIH
> 
> Winston
> 
> -----Original Message-----
> From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com]On Behalf
> Of Karr, David
> Sent: Friday, May 09, 2003 13:53
> To: cygwin AT cygwin DOT com
> Subject: How to "find" all writable files in a directory tree?
> 
> 
> I need to find all the files in a directory tree that are writable.  So,
> the "find" man page has the following text:
> 
> -------------------------
>        -perm mode
>               File's permission bits are exactly  mode  (octal  or
> symbolic).
>               Symbolic modes use mode 0 as a point of departure.
> 
>        -perm -mode
>               All of the permission bits mode are set for the file.
> 
>        -perm +mode
>               Any of the permission bits mode are set for the file.
> -------------------------
> 
> I'm not quite sure what this tells me.  I guessed that "-perm +w" would
> do what I want.  Unfortunately, when I use this it says:
> 
>    find: invalid mode `+w'
> 
> I'm on Cygwin 1.3.22.
> 
> Am I misunderstanding what this man page says?
> 
> 
> --
> 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/
> 
> 
> 
> --
> 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/
> 
> 

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