Search files with grep
Posted #CaffeeLog#Linux
In a programmers live, you need a recursive file search nearly every day.
Of course, this is possible without a heavy IDE and with a simple but useful bash one liner:
$ grep "pattern" -HniR ./path/to/dir
The options in detail:
H
printing the filename of the matchn
print also the line numberi
for a case *in*sensitive searchR
for recursive
Of course, this can also be combined with grep regular expressions.