Recursive Searches
Rigler, Stephen C.
srigler at marathonoil.com
Thu Oct 14 19:25:53 UTC 2004
For something like that I'd use "find" instead of ls.
find . -name \*.php
or
find /some/path -name \*.php
"locate" is also an option, but it won't catch files that were
created since updatedb last ran.
If you were trying to recursively search for a string in a file
use grep like:
grep -r "some string" .
or
grep -r "some string" /some/path
-Steve
-----Original Message-----
From: redhat-list-bounces at redhat.com
[mailto:redhat-list-bounces at redhat.com] On Behalf Of Cutts III, James H.
Sent: Thursday, October 14, 2004 11:47 AM
To: General Red Hat Linux discussion list
Subject: Recursive Searches
I'm trying to get Recursive searches working on my RH9 box.
Recursion works for neither ls no grep.
I've tried, for example, ls -R *.php and ls --recursive *.php And
all I see is the current directory. I know there are numerous *.php
files in the subdirectories.
I've also been through the range of grep recursive options, -R, -r,
--recursive and --directories=recurse
Anyone have any suggestions? Is there some setting somewhere which has
disabled the recursive search?
Thanks very much.
James H. Cutts III
Computer Project Manager
Contracting and Organizational Research Institute
University of Missouri - Columbia
143C Mumford Hall
Columbia, MO
65211
Phone: (573) 882-6181
E-mail: cuttsj at missouri.edu
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
More information about the redhat-list
mailing list