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

    Feb 16, 2016 · grep -r "texthere" . The first parameter represents the regular expression to search for, while the second one represents the directory that should be searched. In this case, . …

  2. How to run grep with multiple AND patterns? - Unix & Linux Stack …

    Mar 25, 2016 · I would like to get the multi pattern match with implicit AND between patterns, i.e. equivalent to running several greps in a sequence: grep pattern1 | grep pattern2 | ... So how to …

  3. linux - What is the point of "grep -q" - Stack Overflow

    May 16, 2019 · Moreover, this is a lot faster than a regular grep invocation, since it can exit immediately when the first match is found, rather than needing to unconditionally read (and …

  4. What is the difference between grep -e and grep -E option?

    grep -e PATTERN unless, as stated in an earlier Answer and in the man pages, there are multiple search patterns, or to protect a pattern beginning with a hyphen (-).

  5. 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 …

  6. 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 …

  7. 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 …

  8. grep with logic operators - Unix & Linux Stack Exchange

    Jan 5, 2015 · Is there a grep-like utility that will enable me to do grep searches with logic operators. I want to be able to nest and combine the logical constructs freely. For example, …

  9. How can I use grep to find a word inside a folder?

    Nov 8, 2010 · 165 grep -nr string my_directory Additional notes: this satisfies the syntax grep [options] string filename because in Unix-like systems, a directory is a kind of file (there is a …

  10. What is the difference between `grep`, `egrep`, and `fgrep`?

    Jan 8, 2017 · From "man grep": three variant programs egrep, fgrep and rgrep are available. egrep is the same as grep -E. fgrep is the same as grep -F. rgrep is the same as grep -r. …