Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering if there was any argument that allowed me to use wget and "call" a page, but without downloading the page.

The problem is that when you call wget on a page, it downloads it to the folder wget.exe resides in, but I don't want to download a file every time I use it.

share|improve this question
up vote 9 down vote accepted

Use the --spider option.

--spider

When invoked with this option, Wget will behave as a Web spider,
which means that it will not download the pages, just check that
they are there. You can use it to check your bookmarks, e.g. with:

            wget --spider --force-html -i bookmarks.html
share|improve this answer
1  
Excellent, exactly what I was looking for – Andreas Grech Jul 21 '09 at 8:07
2  
Beware that --spider may perform a HEAD request instead of a GET request, which means the URL may react differently. – bzlm Oct 10 '09 at 10:22

GNU Wget is a free software package for retrieving files using HTTP, HTTPS and FTP. If you are not actually interested in retrieving files, you may be better off using a tool like cURL, which may have more fine-tuned support for what you want to do. (Using the --spider switch in Wget, for example, is an experimental hack according to the documentation.)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .