Wget: Is there a way to pass username and password from a file

credentialspassworduser-accountswget

Is there a way to pass the username and password from a file instead of the command line via –user and –password?

Background: I want to run wget via cron and don't want the username/password show up in process view

Best Answer

Use a .wgetrc file (GNU manual) in which you can set username and passwords for either or both ftp and http.

To use the same credentials for both specify

user=casper
password=CasperPassword

or individually

ftp_user=casperftp
ftp_password=casperftppass
http_user=casperhttp
http_password=casperhttppass