Results 1 to 2 of 2
hi,
can anybody tell me how to retrieve the size of a file/data before actually downloading from server by using curl.
thanx in advace....
- 04-25-2008 #1Just Joined!
- Join Date
- Apr 2008
- Posts
- 9
curl
hi,
can anybody tell me how to retrieve the size of a file/data before actually downloading from server by using curl.
thanx in advace.
- 04-26-2008 #2Linux Enthusiast
- Join Date
- Apr 2004
- Location
- UK
- Posts
- 658
from the curl man page
Does that do what you need?-I/--head
(HTTP/FTP/FILE) Fetch the HTTP-header only! HTTP-servers feature
the command HEAD which this uses to get nothing but the header
of a document. When used on a FTP or FILE file, curl displays
the file size and last modification time only.
If this option is used twice, the second will again disable
header only.
Chris...To be good, you must first be bad. "Newbie" is a rank, not a slight.


Reply With Quote