About 253,000 results
Open links in new tab
  1. 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 …

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

  3. linux - How to perform grep operation on all files in a directory ...

    Working with xenserver, and I want to perform a command on each file that is in a directory, grep ping some stuff out of the output of the command and appending it in a file. I'm clear on the …

  4. linux - More elegant "ps aux | grep -v grep" - Stack Overflow

    Feb 21, 2012 · When I check list of processes and 'grep' out those that are interesting for me, the grep itself is also included in the results. For example, to list terminals: $ ps aux | grep terminal …

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

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

  7. linux - How to grep for lines which contain particular words in a …

    Oct 10, 2014 · In general, I will have few words which I need to grep on my big log file and print out the line which contains those words. I know how to do simple grep on a file. Suppose if my …

  8. linux - How to grep a string in a directory and all its subdirectories ...

    56 grep -r -e string directory -r is for recursive; -e is optional but its argument specifies the regex to search for. Interestingly, POSIX grep is not required to support -r (or -R), but I'm practically …

  9. unix - How to use grep command on zip files - Stack Overflow

    Sep 2, 2014 · 10 zipgrep will work with zip files only. If you want to grep all files, not only zipped files, then you could use ugrep, which allows to do that with -z flag.

  10. Count all occurrences of a string in lots of files with grep

    Jun 18, 2017 · Grep only solution which I tested with grep for windows: grep -ro "pattern to find in files" "Directory to recursively search" | grep -c "pattern to find in files" This solution will count …