RE: Recursive Searches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx
[mailto:redhat-list-bounces@xxxxxxxxxx] 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@xxxxxxxxxxxx

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list




-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux