Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to monitor the log file of my application which however doesn't work locally but on a SaaS platform and is exposed over HTTP and WebDAV. So, an equivalent of tail -f that works for URLs would do great job for me.

P.S. If you know of any other tools that can monitor remote files over HTTP, it may also be of help. Thanks

share|improve this question
Is it shown as plain text on the remote server or as html? – terdon Dec 3 '12 at 12:46
Plain text with specific format: [timestamp] Error_name ..... Which I then intent to filter through grep – munch Dec 3 '12 at 12:54
You can use wget -N http://somewhere/something, that'll download file only if it's newer than one that you downloaded before or use wget -O - http://somewhere/something to redirect file to stdout. – week Dec 3 '12 at 13:08
up vote 7 down vote accepted

There may be a specific tool for this, but you can also do it using wget. Open a terminal and run this command:

while(1); do \
    sleep 2; \
    wget -ca -O log.txt -o /dev/null; \

This will download the logfile every two seconds and save it into log.txt appending the output to what is already there (-c means continue downloading and -a means append the output to the file name given). The -o redirects error messages to /dev/null/.

So, now you have a local copy of log.txt and can run tail -f on it:

tail -f log.txt 
share|improve this answer
I found out that I could use davfs2 to integrate with the webDAV interface and then use the file like a regular file. This is what I really expected. But your solution is more simple and actually works – munch Dec 3 '12 at 16:05
I found that everything is being saved in "log" file not "log.txt". In my case this works: wget -ca -O log.txt -o /dev/null – yatsa Feb 18 '14 at 10:49
@yatsa yes, you're right, fixed now, thanks. – terdon Feb 18 '14 at 13:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .