Grep

-h Show filename

-n Show line number

-i Ignore case

-c Count

-F String is not a RegEx (faster)

Contiously look at a file for 500

tail -f access.log | grep " 500 "

Find the occurence of 02/Jun/2012:15 or 02/Jun/2012:16

grep " 500 " access.log | egrep "02/Jun/2012:15|02/Jun/2012:16"


Tag Cloud