linux text editor which updates file
I run simulations where output is printed in file. Is there a linux text editor which automatically updates files (while they are open and I am viewing them), in case it is not changed without asking (this will be something like console output). I will be thankful for the help.
Thanks Sparsh |
You could use the tail command with the -f argument to watch text files live. Do you have the text editor open to edit the file while it is being updated, or do you just want to watch it live?
Edit - As an example: Code:
tail -f /var/log/messages |
Thanks. But tail command only shows the last lines.
My scenario is: while a simulation is going on, it prints same output in both std::cout and also a log file. After sometime, the std::cout stops printing any output, so I have to rely on the log file. Now to understand the simulation, I need to understand the output while simulation is going on (they are long simulations). So if I use vim to open log file, it does not update the file (every time I have to close and open). So I was looking a gui/non-gui based editor, which could keep on updating my view of the log file. Thanks. |
Oh, ok... With vim, you can set the following:
Code:
:set autoread Quote:
|
Quote:
|
Awesome! There a most likely other alternatives besides vim and tail, but if that works for you, then it works. Could you also mark your thread as solved, using the thread tools located at the top of the page? Thanks!
Cheers, Josh |
Code:
tail -n +1 -f |
Quote:
|
All times are GMT -5. The time now is 09:52 PM. |