The server log is too large, I would like to grep the logs which has "/API/login" and "/API/init" from the server log.
I'm able to use:
tail -f /server.log | grep -i "/API/login"
to capture those with "/API/Login"
How to add in another condition to include "/API/init" as well?
I've tried this but couldnt work:
tail -f /server.log | grep -i "/API/login" || grep -i "/API/init"
Another thing is how to output this filtered logs to a text file?
Thank you.