Shell - NIX Tail & Grep | Filter by Text

Tuesday, March 13th, 2018 | Coding

Load and watch access_log in realtime. Exclude lines with the defined IP addresses. * IP pipes may require a preceding backslash.

Live example:

sudo tail -f access_log | grep -v "75.185.171.22|127.0.0.1"

sudo tail -f -n 300 access_log | grep -v "75.185.171.22|127.0.0.1"

sudo tail -f -n 500 access_log | egrep "(e19creative.com)"

Include: tail -f mylogfile.log | grep "error: "
Exclude: tail -f -n 300 access_log | grep -v "string"
Exclude Multiple: tail -f -n 300 access_log | grep -v "string|string2"


Comments


E19 Creative

Products | Support | About | Contact | Login