跳转到内容
新建笔记

Linux 文件传输命令

bye、ftp、ftpcount、ftpshut、ftpwho、ncftp、tftp、uucico、uucp、uupick、uuto、scp、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-url
wget --ftp-user=USERNAME --ftp-password=PASSWORD url