What's the best way (or tool) on the Windows (Vista) command line to get size and modification time for a file on a remote webserver, without downloading it?
Thanks! "wget -S --spider" did the trick.
Henning
2008-10-20 10:13:18
A:
I'd download PuTTY and run a telnet session on port 80 to the webserver you want
HEAD /resource HTTP/1.1
Host: www.example.com
You could alternatively download Perl and try LWP's HEAD command. Or write your own script.
Vinko Vrsalovic
2008-10-20 10:06:29
+4
A:
On Linux, I often use curl with the --head parameter. It is available for several operating systems, including Windows.
CesarB
2008-10-20 10:15:19
Thanks! http://www.gknw.net/mirror/curl/win32/curl-7.19.0-ssl-sspi-zlib-static-bin-w32.zip has a statically linked version for Win32 that worked even better than wget.
Henning
2008-10-20 12:27:06
+1
A:
1) See the headers that come back from a GET request
wget --server-response -O /dev/null http://....
1a) Save the headers that come back from a GET request
wget --server-response -o headers -O /dev/null http://....
2) See the headers that come back from GET HEAD request
wget --server-response --spider http://....
2a) Save the headers that come back from a GET HEAD request
wget --server-response --spider -o headers http://....
- David
David Bell
2010-07-28 18:03:36