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

    Feb 16, 2016 · In this case, . means the current directory. Note: This works for GNU grep, and on some platforms like Solaris you must specifically use GNU grep as opposed to legacy …

  2. Find all files containing a specific text (string) on Linux

    Jun 6, 2013 · How do I find all files containing a specific string of text within their file contents? The following doesn't work. It seems to display every single file in the system. find / -type f …

  3. How do I fetch lines before/after the grep result in bash?

    Sep 16, 2012 · The command in the first pipe uses grep to print out all the text that appears a specified number of lines before the matching string, and an additional pipe operator makes …

  4. grep - How to search for a text in specific files in unix - Stack …

    Jun 12, 2015 · This command to check if the word is present in a given directory recursively: 1) Here <hello> is the word which I am search for and it searches recursively in all files starting …

  5. unix - Display exact matches only with grep - Stack Overflow

    2 Try the below command, because it works perfectly: grep -ow "yourstring" crosscheck:- Remove the instance of word from file, then re-execute this command and it should display empty result.

  6. search - grep for special characters in Unix - Stack Overflow

    Sep 12, 2012 · Try vi with the -b option, this will show special end of line characters (I typically use it to see windows line endings in a txt file on a unix OS) But if you want a scripted solution …

  7. unix - Using grep for multiple search patterns - Stack Overflow

    Apr 28, 2014 · Using grep for multiple search patterns Asked 13 years ago Modified 2 years, 2 months ago Viewed 109k times

  8. unix - How to grep for the whole word - Stack Overflow

    0 If you just want to filter out the remainder text part, you can do this. xargs grep -s 's:text ' This should find only s:text instances with a space after the last t. If you need to find s:text …

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

  10. bash - Linux find and grep command together - Stack Overflow

    I am trying to find a command or create a Linux script that can do this two commands and list the output find . -name '*bills*' -print this prints all the files ./may/batch_bills_123.log ./april/