delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/06/16:09:50

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
Message-Id: <5.1.0.14.2.20020706130513.025cca18@pop3.cris.com>
X-Sender: rrschulz AT pop3 DOT cris DOT com
Date: Sat, 06 Jul 2002 13:10:10 -0700
To: "Jim George" <jim DOT george AT blueyonder DOT co DOT uk>,
"Hari Turlapati" <hturlapati AT yahoo DOT co DOT in>, <cygwin AT cygwin DOT com>
From: Randall R Schulz <rrschulz AT cris DOT com>
Subject: Re: ls -R doesn't work; V1.3.12 on Win2000
In-Reply-To: <009401c224c3$087da5b0$0400a8c0@JIMGEORGE>
References: <000901c22458$419aef30$9e00100a AT HTURLAPATI>
Mime-Version: 1.0

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.


Randall Schulz


At 00:59 2002-07-06, Jim George wrote:
>Hari,
>
>     it doesn't work in 1.3.11 either.
>
>     You can always pipe it  to grep (ls -laR | grep '.DOC' for example).
>
>Jim
>
>----- Original Message -----
>From: "Hari Turlapati" <hturlapati AT yahoo DOT co DOT in>
>To: <cygwin AT cygwin DOT com>
>Sent: Friday, July 05, 2002 8:14 PM
>Subject: ls -R doesn't work; V1.3.12 on Win2000
>
>
> > The command "ls -laR *.doc" (Recursive listing of *.doc or *.pdf or
> > *.rtf, in general files with specific extension) under a subdirectory to
> > /cygdrive/c/ doesn't work. Even "ls -laR *.*" doesn't work.
> >
> > But "ls -laR *" lists all the files under the subdirectories.
> >
> > I am using CygWin Release 1.3.12-1 on Win2000 OS. The command "uname -a"
> > on my machine prints out the following:
> >
> > CYGWIN_NT-5.0 HariPC 1.3.12(0.54/3/2) 2002-07-03 16:42 i686 unknown
> >
> > Thanks
> >
> > Hari


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

- Raw text -


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