About the author

Photo of sanduhrs
sanduhrs

Find strings in files with GREP

grep -lniR 'STRING' *

-l
Suppress normal output; instead print the name of each input file from which output would normally have been printed. The scanning will stop on the first match.
-n
Prefix each line of output with the line number within its input file
-i
Ignore case distinctions in both the PATTERN and the input files
*
searches for any file in this folder
-R
searches in all subfolders

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

Website powered by lovely Drupal · Microformats · XML Feed · Valid XHTML, CSS · No www.