bothsolo2500 wrote: ↑Mon Nov 05, 2018 2:52 pmI have a text file that gets updated every few minutes. Is there a way to continuously view the contents without having to close and open the file all the time? I suppose one could write a small scrip and have it run continuosly... but it seems like there should be a more elegant way?
Code: Select all
less +F filename
tail -f filenameThanks for the reply but neither one of these seem to "update" whenever the file gets changed?DirkS wrote: ↑Mon Nov 05, 2018 4:11 pmbothsolo2500 wrote: ↑Mon Nov 05, 2018 2:52 pmI have a text file that gets updated every few minutes. Is there a way to continuously view the contents without having to close and open the file all the time? I suppose one could write a small scrip and have it run continuosly... but it seems like there should be a more elegant way?will do thatCode: Select all
less +S filename tail -f filename
How is your file changing? tail -f assumes you are appending data to a log file, so will only show the changed lines at the end. If the whole file changes, you might not see the changes correctly.
tail --follow works like tail -f, but realises if the file changes completely and tracks those changes too.