如何使用 wget 下载一个目录下的所有文件

版权声明:MZ21G https://blog.csdn.net/qq_35793285/article/details/89879693

今天想要下载编译原理的“虎书”上的资料,使用wget但只是下载了一个index.html~~,如下

于是我就参考资料,写此博客以记录

方法如下:

wget -r -np -nH -R index.html http://url/including/files/you/want/to/download/

各个参数的含义:

  • -r : 遍历所有子目录
  • -np : 不到上一层子目录去
  • -nH : 不要将文件保存到主机名文件夹
  • -R index.html : 不下载 index.html 文件

效果如下:

当然,下载的文件中有些是没用的东西,删了就好~~

参考资料: http://www.xjliu.net/blog/?p=591

猜你喜欢

转载自blog.csdn.net/qq_35793285/article/details/89879693