I want to find all files which contain a specific string of text. The grep command works, but I don't know how to use it for every directory (I can only do it for my current directory). I tried reading man grep, but it didn't yield any help.
|
|
||||
|
|
|
It would be better to use
where
|
|||||||||||||
|
|
If you're looking for lines matching in files, my favorite command is:
Further options that I find very useful:
|
|||||||||||||
|
|
I believe you can use something like this:
|
|||||||||||||||
|
|
If you’re willing to try something new, give
Installation is quite simple:
(Provided you’ve already got the directory |
|||||
|
|
My default command is
I use a capitol 'R' because EDIT: per HVNSweeting, apparently |
|||||||||||||
|
|
I do this using xargs, a very underrated command find ./ | xargs grep string_you_are_looking_for find ./ gives you a recursive list of all the files in a current folder then you pipe it to xargs that executes the grep command on each one of those files |
|||||
|
