About 475,000 results
Open links in new tab
  1. linux - Getting pids from ps -ef |grep keyword - Stack Overflow

    I want to use ps -ef | grep "keyword" to determine the pid of a daemon process (there is a unique string in output of ps -ef in it). I can kill the process with pkill keyword is there any command ...

  2. How can I use grep to show just filenames on Linux? [closed]

    grep -rl "mystring" All the search is done by grep. Of course, if you need to select files on some other parameter, find is the correct solution: find . -iname "*.php" -execdir grep -l "mystring" {} …

  3. linux - Regex (grep) for multi-line search needed - Stack Overflow

    Sep 15, 2010 · I'm running a grep to find any *.sql file that has the word select followed by the word customerName followed by the word from. This select statement can span many lines …

  4. linux - How to grep for the dollar symbol ($)? - Stack Overflow

    hello5 $$$ % cat temp | grep "$$$" Illegal variable name. % cat temp | grep "\$\$\$" Variable name must contain alphanumeric characters. % I want to grep for $$$ and I expect the result to be % …

  5. How to a grep a word from a file and store it into another existing ...

    Oct 7, 2017 · Your command: cat q1.txt | grep -i "osx" test.txt What this actually does is to start cat and grep concurrently. cat will read from q1.txt and try to write it to its standard output, which is …

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

    May 16, 2019 · I was reading the grep manual page and came across the -q option, which tells grep to "not write anything to standard output. Exit immediately with zero status if any …

  7. linux - Using grep and ls -a commands - Stack Overflow

    May 29, 2015 · Using an ls –a and grep, how would you list the name of all of the files in /usr starting with the letter p or the letter r or the letter s using a single grep command? would this …

  8. linux - How to test if a process is running with grep in bash?

    May 5, 2014 · If my_application is running, ps ax will print my_application along with the grep command and pattern. Grep understands [m] as a character class, but it will not match the …

  9. grep recursively for a specific file type on Linux

    In your case just type the following: grep -inr "onblur" --include \*.html ./ consider that grep: command -r: recursively -i: ignore-case -n: each output line is preceded by its relative line …

  10. linux - How to show a 'grep' result with the complete path or file …

    How can I get the complete file path when I use grep? I use commands like cat *.log | grep somethingtosearch I need to show the result with the complete file path from where the …