Quick question, hopefully... I'm building an application with a fairly extensive log file. I'd like the ability at any time to monitor what a specific instance of my application is doing. I could open and close the log file a bunch of times, but its kind of a pain. Optimally, as lines are written to the log file, they would be written to the console as well. So I'm hoping something along the lines of "cat" exists that will actually block and wait for more content to be available in the input file. Anyone have any ideas?
+1 Thanks, but I can only give one correct answer :(
LorenVS
2010-07-07 20:06:00
Not a problem! ;)
Alberto Zaccagni
2010-07-07 20:17:08
+2
A:
An alternate answer for variety: If you're already looking at the log file with less, press capital F to get it to do the same thing tail -f does: wait for new content to be appended and show it.
Marius Gedminas
2010-07-07 20:51:56