RE: Recursive Searches

From: Harper Mann (hmann_at_itgroundwork.com)
Date: 10/14/04

  • Next message: Ed Wilts: "Re: file size limit for the ext3 file system"
    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
    

  • Next message: Ed Wilts: "Re: file size limit for the ext3 file system"

    Relevant Pages

    • RE: Recursive Searches
      ... If you were trying to recursively search for a string in a file ... grep -r "some string" /some/path ... Recursion works for neither ls no grep. ... unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe ...
      (RedHat)
    • Re: SUSE 10.1 - any issues with grep recursion?
      ... Is anyone aware of any issues with grep? ... there is no file that contains that string and ends with *.conf ... root@penne: grep -r SSLEngine *.conf ... notice that there was no recursion. ...
      (alt.os.linux.suse)
    • Re: SUSE 10.1 - any issues with grep recursion?
      ... Is anyone aware of any issues with grep? ... there is no file that contains that string and ends with *.conf ... root@penne: grep -r SSLEngine *.conf ... notice that there was no recursion. ...
      (alt.os.linux.suse)
    • Re: [PHP] Does this seem wrong to anyone else?
      ... That's the point of recursion... ... permissions are okay (if your gonna wrap mkdir() might as well do a proper job), ... PHP General Mailing List ... To unsubscribe, visit: http://www.php.net/unsub.php ...
      (php.general)
    • Re: Linux Command-Line / Make puzzle
      ... The applicable official definitions (i.e. POSIX, SUS) of 'grep' don't have recursion. ... But I guess people using these tools outside their proper context don't know the power of a proper tool _set_, and successfully lobbied for adding a "poor man's find" into grep. ...
      (comp.arch.embedded)