Ubuntu, search for a file and also look in all sub-directories?

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?

2 Answers

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>" *
0

If you want GUI search with subdirectories, use gnome-search-tool . You can find it in the Ubuntu Software Center (12.04 - precise penguin) or you can install it directly in terminal:

sudo apt-get install gnome-search-tool

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like