Results 1 to 5 of 5
Hi,
I'm looking for a tool that will do a job similar to "tail -f". I have a file that is being modified at certain intervals and I want to ...
- 09-02-2010 #1Just Joined!
- Join Date
- Sep 2010
- Posts
- 3
Looking for a file viewer that will react to file changes
Hi,
I'm looking for a tool that will do a job similar to "tail -f". I have a file that is being modified at certain intervals and I want to open that file and see these modifications as they happen.
"tail -f" will only show new lines that are appended to the end of a file and what I need is something that will reflect any changes to the file content anywhere in the file at some specified intervals.
Thanks
- 09-02-2010 #2
Well,
to show differences, you need the previous version.
I dare not mention some hackish attempts with cp, mv and diff as they will surely fall apart as soon as we are talking about bigger files or low latency.
Also I do not know the size or content of the file, nor the update interval.
If possible, can you implement subversion commits?
Or any other version control system for that matter?
Then you can see any change and even restore these.You must always face the curtain with a bow.
- 09-02-2010 #3Just Joined!
- Join Date
- Sep 2010
- Posts
- 3
Thanks for your reply Irithori, but it's not exactly what I'm after. It looks like my question wasn't entirely clear. I'll better clarify what I need.
I don't want to perform a diff, or highlight new stuff, what I want is simply to have a file reloaded automatically whenever it's modified.
- 09-02-2010 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
You might want to look into the inotify facilities. You can watch for changes to a file, directory tree, or file system. You can script it to read/refresh your view of a file of interest when its contents are modified.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 09-02-2010 #5Just Joined!
- Join Date
- Sep 2010
- Posts
- 3
Thank you, I will look into that tool.


Reply With Quote