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 Date: Sat, 6 Jul 2002 16:12:35 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: ls -R doesn't work; V1.3.12 on Win2000 Message-ID: <20020706201235.GD1823@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <000901c22458$419aef30$9e00100a AT HTURLAPATI> <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20020706130513 DOT 025cca18 AT pop3 DOT cris DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.1.0.14.2.20020706130513.025cca18@pop3.cris.com> User-Agent: Mutt/1.3.23.1i On Sat, Jul 06, 2002 at 01:10:10PM -0700, Randall R Schulz wrote: >Jim, > >Apart from the fact that, as Chris F. pointed out, you and Hari seem to >share a misconception about how the "-R" option to "ls" works, your >suggestion about using grep is probably better, in this instance, than >involving "find" as I said you "must" do (a very poor and inaccurate choice >of words). > >You'll probably want to use the "-i" option to grep so that it matches the >letters in the suffixes case insensitively, since Windows doesn't care >about alphabetic case in any part of a file name. > >If you use "egrep" you can get multiple suffixes selected in a single >command: > > ls -laR |egrep -i '.(doc|pdf|rtf)' > >for example. Actually, Randall, I thought you had the better idea. You could always do something like: find . -iname '*.doc' | xargs ls -ld That ends up only performing a 'stat()' on files which specifically match the pattern. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/