如何使用wget从网站下载所有文件(但不是HTML)? [英] How to download all files (but not HTML) from a website using wget?
本文介绍了如何使用wget从网站下载所有文件(但不是HTML)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用 wget
并从网站获取所有文件?
How to use wget
and get all the files from website?
我需要除网页之外的所有文件文件如HTML,PHP,ASP等。
I need all files except the webpage files like HTML, PHP, ASP etc.
推荐答案
要过滤特定的文件扩展名:
To filter for specific file extensions:
wget -A pdf,jpg -m -p -E -k -K -np http://site/path/
或者,如果您喜欢长选项名称:
Or, if you prefer long option names:
wget --accept pdf,jpg --mirror --progress --adjust-extension --convert-links --backup-converted --no-parent http://site/path/
这将镜像网站,但没有 jpg
或 pdf
扩展名将被自动删除。
This will mirror the site, but the files without jpg
or pdf
extension will be automatically removed.
这篇关于如何使用wget从网站下载所有文件(但不是HTML)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文