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 X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: LS -R (Cygwin, latest builds as of 8/15/02, Win2K box) Date: Wed, 21 Aug 2002 13:05:00 -0400 Message-ID: <3D848382FB72E249812901444C6BDB1D0BA958@exchange.timesys.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Robb, Sam" To: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g7LH7kV07409 Travis, Try this: find . -name '*.db' Or, if you have symlinks under the current directory that you want to dereference and search: find . -follow -name '*.db' If you don't escape the * in the command, then the shell expands it for you. If you have a directory that contains two files, a.db and b.db, then: find . -name *.db ... will be expanded by the shell to be: find . -name a.db b.db ... which leads to the "find: paths must precede expression" error (almost certianly not what you want :-) Worse, if you have a directory with one file in it named a.db, then the same command will be expanded by the shell to be find . -name a.db ... which will find all occurances of a file named a.db under the current directory. Probably not what you want, and all the more annoying because find will do exactly what you told it to do, even though that's not what you *meant* for it to do :-/ -Samrobb -----Original Message----- From: My Avatar [mailto:myavatar AT yahoo DOT com] Sent: Wednesday, August 21, 2002 12:50 PM To: cygwin AT cygwin DOT com Subject: LS -R (Cygwin, latest builds as of 8/15/02, Win2K box) I've read all the FAQs, Groups, MsgBoards, & Cygwin archives I can find, and although I have found some user's with similiar problems, none of them ever seemed to be resolved (as far as I could tell). My problem is this. I am trying to use the -R switch with ls to get a listing of files that I am going to send to sort (to get a top 10 kind of thing). I am very fearful that this is going to be flame bait, but feel I have done all I humanly can right now to resolve the issue on my own. When I enter ls -R *.db, it only returns the matching files in the current path (and I verified that there are matching files in the subdirs). Here is one thread that almost seems similiar, but doesnt seem to be resolved... http://www.cygwin.com/ml/cygwin/1999-08/msg00578.html ...when I try to do as the author suggests, I get the following messgage... $ find . -name *.db find: paths must precede expression Usage: find [path...] [expression] ...so I tried... $ find /cygdrive/s/customer/ -name *.db find: paths must precede expression Usage: find [path...] [expression] Here is an example of what happens with LS... $ ls *.db Copy of Langdef.db RSINFO.db S98pcta.db langFltr.db qClass.db Administrator AT TRAVIS /cygdrive/s/customer/dist10 $ cd .. Administrator AT TRAVIS /cygdrive/s/customer $ ls -R *.db ALPHACLS.db ALPHAGRD.db dist.db olddist.db Administrator AT TRAVIS /cygdrive/s/customer $ ls *.db ALPHACLS.db ALPHAGRD.db dist.db olddist.db Your thoughts? Travis Johnson __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- 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/ -- 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/