Simple GREP question

I want to find one particular number in the Asterisk logs. It is 312-402-4616. I thought that typing: cat full|grep “312-402-4616” would work. But all that happens is I get a green bblock cursor as if it’s waiting for something. Can someone help out a total newbie?

grep full “312-402-4616”

you can get all the grep help you want by typing man grep at the linux prompt.

That’s backwards.

It’s grep string filename

If you go to the log directory ‘cd /ver/log/asterisk’ then ‘grep “312-402-4616” *’ will check every file in the current directory. If you change the * for full the current log will be searched for pattern defined in the string.

you are correct. Thanks for correcting my typo. It’s not like I don’t use the command 10 times a day for other things.

Thanks for the help, guys! :slight_smile: