25

If I don't want to have to download the files found in a specific url path manually, what options do I have? Using wildcards fail:

$ wget 'http://www.shinken-monitoring.org/pub/debian/*deb'
Warning: wildcards not supported in HTTP.
....

This of course assumes that I don't know the filenames in advance.

1 Answer 1

27

Try this:

wget -r -l1 --no-parent -A ".deb" http://www.shinken-monitoring.org/pub/debian/

-r recursively
-l1 to a maximum depth of 1
--no-parent ignore links to a higher directory
-A "*.deb" your pattern

2
  • Although it's true in this case - this does assume that the web server returns a page at the URL that lists all the files. If it returns an index page without any of the mentioned files, wget can magically get them. Aug 17, 2011 at 18:57
  • 7
    I think that an option -nd also will be useful here. It allows to download matched files to the current directory without creating a hierarchy of directories.
    – annndrey
    Jul 10, 2014 at 13:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.