Friday, May 17, 2024
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 22337  / 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
memorrappin questions
Tue, Aug 23, 22, 13:34, 2 Years ago
Fri, Aug 12, 22, 14:45, 2 Years ago
Thu, Jan 12, 23, 01:52, 1 Year ago
Fri, Sep 9, 22, 05:27, 2 Years ago
Sun, Apr 3, 22, 16:14, 2 Years ago
;