Download files from a http authenticated directory using wget
I wanted to download something off a sub-domain using wget that I have password protected using .htaccess so the following command was NOT working [code lang="plain"]wget http://secure.asim.pk/myfiles.tar [/code] Luckily, we can pass two arguments to the same command and tell wget what the username and password is [code lang="plain"]wget http://secure.asim.pk/myfiles.tar --http-user=myuser --http-password=mypass [/code] Works Great!! If you are using Ubuntu 8.10, have not enabled root user and trying to download to a directory that has "nobody" or "root" as owner then try pre-pending it with sudo [code lang="plain"]sudo wget http://secure.asim.pk/myfiles.tar --http-user=myuser --http-password=mypass [/code]