How to search through all the files in all the levels of your directories.

Discussion in 'Linux Networking' started by dsaklad, Mar 5, 2005.

  1. dsaklad

    dsaklad Guest

    In emacs, what can be done to run a command?... like
    find -type f -print0 |xargs -0 grep -i foo

    The prompt appeared and an error message...
    Fatal error (11).Segmentation fault

    I'm trying to search thought all files in all the levels of my
    dsaklad, Mar 5, 2005
    1. Advertisements

  2. dsaklad

    Carl Fink Guest

    Why are you bringing up emacs?

    Did you try "find / -type f -exec grep -i foo {} \;"?

    Come to think of it, what does this have to do with networking? For
    that matter, what does it have to do with Linux? "find" is not a
    Linux-specific program.
    Carl Fink, Mar 5, 2005
    1. Advertisements

  3. dsaklad

    Mark Guest

    Don't know much about emacs
    Not sure where emacs figures into all this, but you can always use:
    egrep -ri "is this a network question" .

    This will search all files, in all directories, below your current root.
    Note, the 'i' means case insensitive.

    Mark, Mar 11, 2005
  4. dsaklad

    GreyBeard Guest

    If you run "man grep" on your system, you will be able to check whether
    grep on your system supports the Recursive option.

    IOW: you might be able to run,

    grep -Ri foo *

    as I've done on all my SuSE and RH systems for several years now. The -R
    means recurse through directories.

    However, I've always run this in a shell, never in emacs.

    GreyBeard, Mar 11, 2005
  5. Whats wrong with





    And see where your space is being chowed.. , "du"
    Coenraad Loubser, Mar 11, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.