文件传输
跳转到“文件传输”bye、ftp、ftpcount、ftpshut、ftpwho、ncftp、tftp、uucico、uucp、uupick、uuto、scp、wget
wget
跳转到“wget”Gqat0ulAlpm5gAXDgOVh1G3L8vi1maZF xn2MCt8dgCRQm9Mk88AjReYO6fgxWFcr
| 选项 | 说明 | 示例 |
|---|---|---|
-V 或 --version | 显示wget的版本信息,然后退出。 | wget -V |
-h 或 --help | 打印帮助信息,然后退出。 | wget --help |
-b 或 --background | 启动后转入后台运行。 | wget -b http://example.com/file |
-e 或 --execute | 执行.wgetrc风格的命令。 | wget -e robots=off http://example.com |
-o 或 --output-file | 将日志消息记录到文件。 | wget -o log.txt http://example.com/file |
-a 或 --append-output | 将消息追加到日志文件。 | wget -a log.txt http://example.com/file |
-d 或 --debug | 打印大量调试信息。 | wget -d http://example.com/file |
-q 或 --quiet | 安静模式(无输出)。 | wget -q http://example.com/file |
-v 或 --verbose | 详细模式(默认)。 | wget -v http://example.com/file |
-nv 或 --no-verbose | 关闭详细模式,但不进入安静模式。 | wget -nv http://example.com/file |
-c 或 --continue | 继续下载部分完成的文件。 | wget -c http://example.com/partialfile |
--max-redirect | 设置允许的最大重定向次数。 | wget --max-redirect=5 http://example.com |
-U 或 --user-agent | 使用指定的用户代理。 | wget -U Mozilla http://example.com |
--no-cookies | 不使用cookies。 | wget --no-cookies http://example.com |
-r | 递归下载,跟随链接。 | wget -r http://example.com/dir |
-l 或 --level | 设置递归下载的最大深度。 | wget -l 2 http://example.com/dir |
--follow-ftp | 在HTML文档中跟随FTP链接。 | wget --follow-ftp http://example.com/dir |
-m 或 --mirror | 镜像指定目录,相当于-N -r -l inf --no-remove-listing。 | wget -m http://example.com/dir |
-A 或 --accept | 接受的文件类型列表。 | wget -A.pdf http://example.com/dir |
-R 或 --reject | 拒绝的文件类型列表。 | wget -R.jpg http://example.com/dir |
# 伪装代理名称下载wget --user-agent="Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16" http://www.linuxde.net/testfile.zip
# 下载指定格式文件wget -r -A.pdf url
# 限制总下载文件大小wget -Q5m -i filelist.txt
# 过滤指定格式下载wget --reject=gif ur
# 镜像网站wget --mirror -p --convert-links -P ./LOCAL URL--miror开户镜像下载。-p下载所有为了html页面显示正常的文件。--convert-links下载后,转换成本地的链接。-P ./LOCAL保存所有文件和目录到本地指定目录。
# FTP下载wget ftp-urlwget --ftp-user=USERNAME --ftp-password=PASSWORD url