Question

I have a application where the log files are being generated in a Linux Machine .

I want to monitor the application while it is in production , so when i used the tail command with the log file name , it only shows only a portion of the updated file .

The command i used is tail MyLog.log

My question is , is it possible to see the whole latest Portion of the file which is updated? Any suggestions?

Was it helpful?

Solution

You can follow the growth of the file by using the -f option of tail:

tail -f MyLog.log

OTHER TIPS

I don't think you can check only the latest updated portion. However you can check the n lines of file using -n flag and using -f flag this process repeats itself.

So you can use something like tail -f -n 10 Mylog.txt

You can read more about tail command at http://www.computerhope.com/unix/utail.htm

Open the file in question with less and press F. This is akin to @codaddict solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top