Server Administration & Management

How to use wget with username and password

There are some sites that ask you to provide a login identity in order to access the restricted section of its filesystem.

The command line with wget is something like this:

# wget –http-user=the-username –http-password=the-passwordhttp://any.valid.url/and_path/and_file’

So you are mostly using wget as in its simple way, which is: wget http://url/path/filename

But with the options

–http-user: Where you specify a valid user to access the restricted area in the remote site
–http-password: Where you specify the password of the above mentioned user.


June 21, 2011 Posted by | Tips & Tricks, Unix/Linux | , , , | Leave a comment