grep for specific phrases
Is there a way to grep for an absolute string without returning partial word matches? Let's say I'm pulling a directory listing and looking for a particular file called test.txt. A ls shows:
If I try to grep test.txt, I get test.txt and test.txt.bak. I just want to return test.txt. I tried using the -w command but it didn't work, I'm guessing because there's no special characters after .txt, like a space or tab, just a continuation of alphanumerics. Any way to do this?