j said:
I've lost the head command on my win XP laptop, I think it was never
there.
There isn't a head command provided within Widows. Given you mentioned that
you'd just lost the "head" command, it does imply that you used to have a
head utility which did this for you. I'm not aware of one, but if there is
then I'd hope that someone else will post back.
Suggestions for viewing the Content-type and other header data?
Its not quite the same but "more <filename>" will give you a page worth of
the file contents - but unlike head which just gives you "n" lines more will
give you a page worth at a time, so you will need to control-C if you don't
want to see all of the file.
You mentioned content-type and other header-data, I don't know about the
unix "head" command but I don't think there is any way of connecting "more"
up to a server. If you want to view header and content-type information then
you could try CryPing (free on my site
http://www.cryer.co.uk/downloads/cryping/ ).
For example:
C:\>cryping -v -n 1 -http
www.cryer.co.uk
CryPing - from
www.cryer.co.uk v1.6 (build June 2010)
Pinging
www.cryer.co.uk for HTTP status:
Reply from
www.cryer.co.uk: 200 OK time=376ms
HTTP/1.1 200 OK
Date: Tue, 26 Jul 2011 09:03:58 GMT
Server: Apache
Last-Modified: Sat, 16 Jul 2011 09:00:50 GMT
ETag: "5590677-20d8-4a82c00a9d480"
Accept-Ranges: bytes
Content-Length: 8408
Connection: close
Content-Type: text/html
HTTP ping statistics for
www.cryer.co.uk:
Requests: Sent = 1, Responses = 1, Lost = 0 (0% loss).
200 OK 1 times (100%)
Approximate round trip times:
Minimum = 376ms, Maximum = 376ms, Average = 376ms
It might be overkill for what you want, but with the "-v" (verbose) flag it
does show headers received back from the server, as shown above.
Hope this helps.