[PLUG] Using wget/curl to download all files in directory

Jim Garrison jhg at jhmg.net
Sun Feb 5 21:33:41 UTC 2012


On 2/5/2012 1:18 PM, Rich Shepard wrote:
>    I've read the man pages for wget and curl and tried various command line
> syntaxa (syntaxes? syntaxim?) but none worked. Perhaps these are not the
> proper tools (I installed a firefox add-on called DownThemAll but could not
> find instructions how to use it.)
> 
>    What I'd like to do is specify a URL and download all files in that
> directory, or a wildcard-specified set such as *.t?z.
> 
>    I'd appreciate learning how to use wget, curl, or another tool to do this.

What type of URL is it? HTTP? FTP? There's really not a one-to-one
mapping of URLs to specific files, or even directories. There's nothing
that says the server even has to provide a list of files visible
at a given path. Some servers do so as a default, but others may
not. You have to know how to request a list of those files from the
server, be able to parse it, and then issue the appropriate commands.

-- 
Jim Garrison (jhg at acm.org)
PGP Keys at http://www.jhmg.net RSA 0x04B73B7F DH 0x70738D88



More information about the PLUG mailing list