Saturday, November 30, 2013

Suppose you are on top windo and want to kill a process. what to do ???

hit 'Q' and then do usual kill stuff . well but there is a choice. dnt quit and hit 'k'.

it will ask for id.give the id and it will kill the process. :)

Thursday, November 28, 2013

if a grep statement is successful then it retun 0 if failed then it returns 1.

bingo !
creating alias in mac/linux/unix/cent OS :)

alias ll="ls -lrt"

Caution : This will not remail permanent. add this line to ~/.bash_profile .Quit terminal and boom !!!

it's working now.
tail -f /var/log/messages | grep --line-buffered -i "snmp" >> /data/SNMPLogs/snmp_$DateTimeStamp.log &
for greping streaming data using grep
use "--line buffered", in case streaming data is too high.
grep -b 2 "peak_flow_alarm_cleared" /data/SNMPLogs/snmp_$DateTimeStamp.log | grep ipfix 2>&1 >/dev/null
for capturing a line + 2 line before it and further serching a specific term among those lines

for after use -n or -a n

for both use -c n

*upper and lower case both work.