Is it possible and how...

Is it possible to search through a file without having to load it into RAM. What I an asking is this. If i know the format of a file, say text format. And I want to search through it for a string. if it contains the string i am looking for i will open it if not i will not waste my time with it.

How can I search the contents of a file without actually opening it. Can I just read throught on the hard drive? Say i have a 30meg text file and i want to search it. So to save my computer from etting bogged down by trying to open it and read a line at a time would it be possible to just leave it on the hard disk and read it fro there?

If so how?

Thanks!