How to see the whole portion of the Updated Content of a file
Domanda
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?
Soluzione
You can follow the growth of the file by using the -f
option of tail:
tail -f MyLog.log
Altri suggerimenti
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