Using two greps in same line
Hello,
is this a valid statement? Quote:
but it produces the result expected. |
Hi skoda,
sure is a valid expression, althoug some may say it's not efficient, but that depends on how much data you are greping. question: you are getting the data you need? i got confused in your last statement |
Looks fine, except for the additional x in your final ip address octet, and the useless use of cat.
Code:
grep "NEW .*app=cpaneld" /usr/local/cpanel/logs/session_log | grep xxx.xxx.xxx.xxx Code:
grep "NEW .*xxx.xxx.xxx.xxx.*app=cpaneld" /usr/local/cpanel/logs/session_log |
Quote:
Quote:
thanks for the comment btw. ---------- Post added 07-30-14 at 12:29 PM ---------- Quote:
|
If this is a hacker,. very first thing to do is remove the box from the network. Then go through your backup/restore, root-cause, fix/patch/update, verification routine before putting it back in service.
You can head over to http://www.linuxquestions.org/questi...ux-security-4/ for help root-causing the attack vector and getting advice. Unspawn is the moderator there and he knows his stuff. Check his stickies out on the subject. |
Quote:
|
All times are GMT -5. The time now is 11:35 PM. |