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 From: "Winston Gutkowski" To: "Cygwin" Subject: RE: How to "find" all writable files in a directory tree? Date: Fri, 9 May 2003 15:13:52 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Don't want to flog a dead horse, but if I read the manpages right it seems that -222 should be true only if the 'w' flag is on in all 3 positions, but +222 will be true only if the 'w' flag is on in *any* of the 3 positions. Is this right? Also, I didn't find any refernce to the shorthand +2. Perhaps it's one of those mystical osmosis things...:-) Winston -----Original Message----- From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com]On Behalf Of lists AT m8y DOT org Sent: Friday, May 09, 2003 15:09 To: cygwin AT cygwin DOT com Subject: RE: How to "find" all writable files in a directory tree? On Fri, 9 May 2003, Randall R Schulz wrote: > > At 14:44 2003-05-09, lists AT m8y DOT org wrote: > >-perm +222 is redundant > > How do you figure? There are 8 combinations of write enable bits that > this permission specification matches. For "-perm +2" only one bit is > examined and there's only one way for it to succeed. My reading of the manual is that: -222 examines bit 2 being on in all of the 3 areas +2 examines bit 2 being on in all of the 3 areas 222 checks exact permissions 222 > >-perm +mode > > Any of the permission bits mode are set for the file. > > > >-perm -222 is equivalent to -perm +2 > > Either I'm dense or you're mistaken. I could be mistaken, but -perm +2 has always worked for me. I'll test it later. > Are you assuming a FAT file system? Cygwin takes advantage of NTFS > permissions when possible (and when the now-default ntsec option of the > CYGWIN environment variable is enabled). Nope, and yes, am aware :) > 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/ > > -- 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/