{{theTime}}

Search This Blog

Total Pageviews

How to find FileName, LineNumber of a text in all subdirectories using cygwin

$grep -Hrn "search string" .

  • -H causes the filename to be printed (implied when multiple files are searched)
  • -r does a recursive search
  • -n causes the line number to be printed
Other useful flags:
  • -I To ignore binary files (complement: -a treat all files as text)
  • -F treat search term as a literal, not a regular expression
  • -i a case-insensitive search
  • --color=always Force colors even when piping through less. To make less support colors, you need to use the -r option:
    grep -Hrn search . | less -r
    
  • --exclude-dir=dir For excluding directories like .svn and .git.

No comments:

Could not find method signingConfigs() for arguments

Could not find method signingConfigs() for arguments [build_5dw7nwfc8ibd8sagvx4p79x1u$_run_closure5@13e86039] on root project 'android&#...