05 mars 2013

How To Use wget With Username and Password for FTP / HTTP File Retrieval

Q. How do I use wget ftp / http client tool to download files from password protected web page?

A. wget command supports username and password combo for both FTP and HTTP file retrieval.
Pass following option to wget command:
--user=userName: Your FTP/HTTP username
--password=passWord : Your HTTP/FTP password
These parameters can be overridden using the --ftp-user and --ftp-password options for FTP connections and the --http-user and --http-password options for HTTP connections.
Download a file called foo.pdf from theos.in:
$ wget --user=vivek --password='myPassword' http://theos.in/protected/area/foo.pdf

Aucun commentaire :

Enregistrer un commentaire