1
So I need to monitor a log file in linux and I'd like to cat the contents (to see all previous entries) as well as tail the log file while simultaneously using the grep to filter out the stuff I want to see from the log. Also, it would be nice if the tail would continue where the cat command stopped displaying entries.
How would I go about doing that?
EDIT:
To make my question a bit more clear, here is what I want:
log.txt:
Line 1 <--- Starting from here is what lines I need
Line 2
Line 3
Line 4
Line 5 <--- Here is where the tail command will start displaying
Line n - 1
Line n <--- Here is where the tail command will continue to go
I need to be able to grab all of this and grep it.
1+1 for the cute trick. The original question is impossible, though. – MariusMatutiae – 2015-12-21T10:48:21.367