If you want to grep for certain http response codes in a apache log file

Look for all access requests that do NOT have a 200 response code

grep -i -v "[: ]200[: ]" HTTP_ACCESS_LOG

Look for all access requests with a 200 response code

grep -i "[: ]200[: ]" HTTP_ACCESS_LOG

Details of the options

"[: ]"

tells grep to look for space or tab before the specified string, which in this case is 200.

HOW TO : grep for response codes in apache logs

If you want to grep for certain http response codes in a apache log file Look for all access requests with a 200 response code[code] grep...