Recently I have observed that this is one of the most frequently used linux command. But I realized most of the linux developers not aware of this command. It is the “tail” command. It is the right time to explain the usage of this. I am about to explain, how to view log file dynamically?
Are you using log files in software development?
All the developers in the universe will use log files to debug their application. But the way of handling may be differs to each others. But everyone using log files to track the application’s running status or to debug it.
How are you debugging through log file?
- I have seen this some of the developers are doing this during the live debugging in their application. While debugging in live application, each time they are opening the log file in vi editor and review the logs and closing.
- In the same situation, most of the developers will follow this too. Opening the log file in any of the editors. Upon changing log file content in background, editor will ask alert to reload the file again and again.
Are you still following above cases?
Use the following tail comment.
tail -f <file-path>
Now you will get the every background changes of the file will be updated in live.