Possible to read just from a certain point in HTML document (logfile)
Hi
I am trying to find a way to read only the end of a txt file appended to by a webserver. assume http://somesite.com/myfile.txt data1 data2 .. data10 read full file server adds data Data x Data y I then want to continue from after data10 to minimize server load. Is there a way to do this? Thanks! |
Hi,
possible with awk, see examples from here Code:
awk '/search_pattern/{f=1;next}f' file Code:
cat /var/log/messages | awk '/search_pattern/,0' |
I don't have direct access to that server. So what I need to make happen is to make the webserver only send me the data that is new.
Otherwise I might as well just get the whole file over and over again. But this is to minimize server load since the file is growing over the day. |
for that you will need a PHP or some script to get the file from server and show you only the lines you want.
I don't know if there is anything like that already on the internet, because I assume that every time you want data from file, the last lines change so the search condition also changes from previous search. Post a sample file with data to get more help (you can use pastebin and post a link to that file here. |
All times are GMT -5. The time now is 11:10 AM. |