search with in Data displayed as a result of tail Operation?
linux
Solution
Two ways:
tail -n 10000 MyLog| grep -i "search phrase"
tail -f -n 10000 MyLog | less
The 2nd method will allow you to search with /. It will only search down but you can press g to go back to the top.
Edit: On testing it seems method 2 doesn't work all that well... if you hit the end of the file it will freeze till you ctrl+c the tail command.
Problem
I am working on a Java EE application where its logs will be generated inside a Linux server . I have used the command `tail -f -n -10000 MyLog` It displayed last 1000 lines from that log file . Now I pressed Ctrl + c in Putty to disconnect the logs updation ( as i am feared it may be updated with new requests and I will loose my data ) In the displayed result, how can I search for a particular keyword ?? (Used / String name to search but it's not working)