Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Unix 使用wget从受密码保护的链接下载文件_Unix_Download_Passwords_Wget_Protected - Fatal编程技术网

Unix 使用wget从受密码保护的链接下载文件

Unix 使用wget从受密码保护的链接下载文件,unix,download,passwords,wget,protected,Unix,Download,Passwords,Wget,Protected,我正在尝试使用wget从受密码保护的http链接下载文件。我使用以下语法: wget--http user=user--http密码=xxxxxxhttp://...... 我是否使用了正确的语法?用户和密码应该用引号括起来还是用双引号括起来 我几年前就这样做了,幸运的是在我现有的备份中找到了脚本 我记得这是一个两阶段的过程 第一步是获取并存储cookie: 第二种方法是使用这些cookies获取所需的文件/页面: wget --load-cookies nameofcookiesfile.tx

我正在尝试使用wget从受密码保护的http链接下载文件。我使用以下语法:

wget--http user=user--http密码=xxxxxxhttp://......


我是否使用了正确的语法?用户和密码应该用引号括起来还是用双引号括起来

我几年前就这样做了,幸运的是在我现有的备份中找到了脚本

我记得这是一个两阶段的过程

第一步是获取并存储cookie:

第二种方法是使用这些cookies获取所需的文件/页面:

wget --load-cookies nameofcookiesfile.txt -p http://web.site.com/section/ -O savedoutputfile.html -nv
这些命令与我使用的完全相同(除了我更改了用户名、密码、文件名和网站)。我还发现了这个链接,它可能对我有所帮助,尤其是“推荐人”部分:

希望这有助于或至少给某人一个起点

wget --load-cookies nameofcookiesfile.txt -p http://web.site.com/section/ -O savedoutputfile.html -nv