Friday, May 3, 2024
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 22331  / 3 Years ago, thu, may 20, 2021, 10:50:09

I am working on a Ruby on Rails project so I have to manage multiple files. I think I made a syntax mistake somewhere but I'm not sure well. It would be awesome if I could search for a keyword through the entire project directory.



I'm sure there's some command on Terminal, but I'm not sure what it is.


More From » command-line

 Answers
3

You can use the recursive mode of grep:



grep -R pattern directory


ack (ack-grep on Ubuntu) and ag are also good for this.


[#24479] Friday, May 21, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
memorrappin

Total Points: 325
Total Questions: 122
Total Answers: 100

Location: Armenia
Member since Sat, Sep 12, 2020
4 Years ago
;