Hello,
I have active log file i want to grep the last occurrence of the word in that log file the log file gets on increasing and increasing i want to fetch it from live file.
Please guide me, Thanks in advance
Hello,
I have active log file i want to grep the last occurrence of the word in that log file the log file gets on increasing and increasing i want to fetch it from live file.
Please guide me, Thanks in advance
try tail -f : read the tail man page first!
tail -f /directory/logfile | grep 'some words'
but what if that word is comes 2 times then i only want the last occurrence
tac somefile | grep -m 1 someword
Thks gonis for your valuable input...
many many thx once again