viewing the updated data in a file
Posted
by benjamin button
on Stack Overflow
See other posts from Stack Overflow
or by benjamin button
Published on 2010-04-13T06:16:48Z
Indexed on
2010/04/13
6:23 UTC
Read the original article
Hit count: 386
If i have file for eg: a log file created by any background process on unix, how do i view the data that getting updated each and every time.
i know that i can use tail command to see the file.but let's say i have used
tail -10 file.txt
it will give the last 10 lines.but if lets say at one time 10 lines got added and at the next instance it has been added 2 lines. now from the tail command i can see previous 8 lines also.i don't want this.i want only those two lines which were added.
In short i want to view only those lines which were appended.how can i do this?
© Stack Overflow or respective owner