cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl as a tail -f

From: Jeff Pohlmeyer <yetanothergeek_at_gmail.com>
Date: Wed, 29 Apr 2009 12:26:19 -0500

On Apr 28, 2009, Brian J. Murrell wrote:

> Could [lib]curl not efficiently poll (at a prescribed interval) that URL
> looking for newly appended content using whatever mechanism is behind
> the -C option?

You might be able to use something like:
   curl -o <somefile> --time-cond <somefile> -C -
every few seconds or so.

Provided the server supports this, it should respond by
either sending the new content, or with a 304 "Not Modified"
response. (Or possibly a 416, if the file has actually been
truncated since the last request.)

 - Jeff
Received on 2009-04-29