About 304,000 results
Open links in new tab
  1. How do I recursively grep all directories and subdirectories?

    Feb 16, 2016 · If you find yourself frequently using grep to do recursive searches (especially if you manually do a lot of file/directory exlusions), you may find ack (a very programmer-friendly …

  2. What's the difference between grep -r and -R - Stack Overflow

    Mar 31, 2014 · In the man page: -r Read all files under each directory, recursively, following symbolic links only if they are on the command line. what exactly does "being on the command …

  3. Using the star sign in grep - Stack Overflow

    Jul 6, 2016 · grep itself doesn't support wildcards on most platforms. You have to use egrep to use wildcards. Shells have a different syntax. "*" in the shell is <any string>. In egrep it's an …

  4. UNIX grep command (grep -v grep) - Stack Overflow

    Apr 5, 2015 · 11 grep when used with ps -ef also outputs the grep used for filtering the output of ps -ef. grep -v grep means that do not include the grep used for filtering in the command …

  5. How can I "grep" for a filename instead of the contents of a file?

    grep is used to search within a file to see if any line matches a given regular expression. However, I have this situation - I want to write a regular expression that will match the filename itself …

  6. grepping using the result of previous grep - Stack Overflow

    Sep 20, 2015 · Is there a way to perform a grep based on the results of a previous grep, rather than just piping multiple greps into each other. For example, say I have the log file output …

  7. linux - Grep command with multiple patterns - Stack Overflow

    Dec 12, 2019 · Hi i am currently use this to grep: $ grep -nri --exclude-dir=DELIVERY_REL "xxxxxx\.h" --colour --include=*.{c,h} I am trying to fine tune the search results of my grep to …

  8. regex - How can I exclude one word with grep? - Stack Overflow

    Dec 27, 2010 · Here grep will try to list all the occurrences of 'wanted_pattern' in all the files from within currently directory and pass it to second grep to filter out the 'unwanted_pattern'. '|' - …

  9. Negative matching using grep (match lines that do not contain foo ...

    How do I match all lines not matching a particular pattern using grep? I tried this: grep '[^foo]'

  10. How to grep for lines above and below a certain pattern

    Oct 11, 2013 · Use grep with the parameters -A and -B to indicate the number a of lines A fter and B efore you want to print around your pattern: grep -A1 -B1 yourpattern file An stands for n …