If I am in a particular directory path, I want to search for all files in any folder/sub-folder.

How can I do this?

link|improve this question

48% accept rate
feedback

1 Answer

up vote 5 down vote accepted

In a terminal:

To list all files in the current directory and all sub-directories:

$ find .

To search for a file by name in the current directory and all sub-directories:

$ find . -name <file_name>

Or to search in all files in the current directory and all sub-directories for a particular string:

$ grep -R "<string>" *
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.