RE: Recursive Searches
From: Harper Mann (hmann_at_itgroundwork.com)
Date: 10/14/04
- Previous message: Nguyen, Minh: "RE: Changing sender email address"
- In reply to: Rigler, Stephen C.: "RE: Recursive Searches"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: "'General Red Hat Linux discussion list'" <redhat-list@redhat.com> Date: Thu, 14 Oct 2004 14:38:08 -0700
You may be interested in "locate". It reads a dB that is updated every
night with a complete file index. There is a man page.
You can re-run the dB update by running "updatedb", but that can take a few
minutes depending on the speed of your machine. It's usually pretty fast.
So I run updatedb when I've just installed something new and I want to find
files in it.
Regards,
- Harper
Harper Mann
Groundwork Open Source Solutions
510-599-2075 (cell)
-----Original Message-----
From: redhat-list-bounces@redhat.com [mailto:redhat-list-bounces@redhat.com]
On Behalf Of Rigler, Stephen C.
Sent: Thursday, October 14, 2004 12:26 PM
To: General Red Hat Linux discussion list
Subject: RE: Recursive Searches
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@redhat.com
[mailto:redhat-list-bounces@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@missouri.edu
-- redhat-list mailing list unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list -- redhat-list mailing list unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list -- redhat-list mailing list unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list
- Previous message: Nguyen, Minh: "RE: Changing sender email address"
- In reply to: Rigler, Stephen C.: "RE: Recursive Searches"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|