Grep through subdirectories

Posted by Kathryn on Ask Ubuntu See other posts from Ask Ubuntu or by Kathryn
Published on 2012-09-24T14:48:11Z Indexed on 2012/09/24 15:49 UTC
Read the original article Hit count: 303

Filed under:
|
|

Add a string to a text file from terminal

I've been looking at this thread. The solution (number 2, with ls | grep) works perfectly for files called .txt in the current directory. How about if I wanted to search through a directory and the subdirectories therein?

For example, I have to search through a directory that has many subdirectories, and they have many subdirectories etc.

I'm new to Linux sorry, so I'm not sure if this is the right place

© Ask Ubuntu or respective owner

Related posts about command-line

Related posts about bash