find out how big a file but not download it

find out how big a file but not download it

Post by Dan Jacobso » Thu, 19 Dec 2002 08:53:34



How can I find out how big a file is before downloading it, say from
the command line?

On http://www.confluence.org/pressroom.php it says
"The interview is available in MP3 format in high , medium or low
bandwidth versions." with 3 links.

I suppose I would use a HTTP HEAD request to find out how big they
were before deciding on downloading, but this is not a command line method.

I could start wget and hit ^C right away, but that is messy,
especially for a script.

I don't think wwwoffle can just get HEAD.

OK, I figured it out.  Can you believe I must do e.g.
echo http://jidanni.org|wget --delete-after -SQ1 -i -
I.e. I can set a quota of no less than one byte.  I must use -i if I
have only one site.  Perhaps the wget wishlist should be aware of this...
--
http://jidanni.org/ Taiwan(04)25854780

 
 
 

find out how big a file but not download it

Post by a9ac9.. » Thu, 19 Dec 2002 15:14:09


|On http://www.confluence.org/pressroom.php it says
|"The interview is available in MP3 format in high , medium or low
|bandwidth versions." with 3 links.
|
|I suppose I would use a HTTP HEAD request to find out how big they
|were before deciding on downloading, but this is not a command line method.
|
|I could start wget and hit ^C right away, but that is messy,
|especially for a script.
|
|I don't think wwwoffle can just get HEAD.
|
|OK, I figured it out.  Can you believe I must do e.g.
|echo http://jidanni.org|wget --delete-after -SQ1 -i -
|I.e. I can set a quota of no less than one byte.  I must use -i if I
|have only one site.  Perhaps the wget wishlist should be aware of this...

Can you believe perhaps you should read the wget documentation? wget
--spider does a HEAD which is what you want.