Tuesday 25 June 2013

Find a File by its Contents (uBuntu Contents Search)

So you can find a file by it's name pretty easily using Nautilus but how do you search for it's contents?

Enter the following code in the terminal:
grep -lir "search text" /path/to/directory
And it'll return a list of files containing your search terms within them.

No comments:

Post a Comment