grep the file system

Find all files matching a particular phrase on your file system.

#the minus R option searches recurisively through files.

~$ sudo grep -R “shutdown” /var/log/messages

Oct 28 09:25:00 jeremiah-laptop nagios2: Successfully shutdown… (PID=6230) Oct 29 16:03:33 jeremiah-laptop nagios2: Successfully shutdown… (PID=6206)