美文网首页
Windows下wget命令的使用

Windows下wget命令的使用

作者: 佳名 | 来源:发表于2019-11-23 19:40 被阅读0次

wget在Linux下不用安装,而在Windows下需要安装。学校的Linux下,ipv6时不时的会不能用,当从NCBI SRA数据框下载高通量测序数据时,如果不用ipv6,需要花费大量的时间,所以转向Windows的wget。
下载wget.exe。https://eternallybored.org/misc/wget/1.20.3/64/wget.exe

wget -h
GNU Wget 1.20.3, a non-interactive network retriever.
Usage: wget [OPTION]... [URL]...

Mandatory arguments to long options are mandatory for short options too.

Startup:
  -V,  --version                   display the version of Wget and exit
  -h,  --help                      print this help
  -b,  --background                go to background after startup
  -e,  --execute=COMMAND           execute a `.wgetrc'-style command

Logging and input file:
  -o,  --output-file=FILE          log messages to FILE
  -a,  --append-output=FILE        append messages to FILE
  -d,  --debug                     print lots of debugging information
  -q,  --quiet                     quiet (no output)#安静(屏幕无输出)
  -v,  --verbose                   be verbose (this is the default)#默认选项,屏幕打印信息
  -nv, --no-verbose                turn off verboseness, without being quiet#关掉冗长信息,有屏幕输出
       --report-speed=TYPE         output bandwidth as TYPE.  TYPE can be bits#输出带宽为TYPE。类型可以是bits
  -i,  --input-file=FILE           download URLs found in local or external FILE
       --input-metalink=FILE       download files covered in local Metalink FILE
  -F,  --force-html                treat input file as HTML
  -B,  --base=URL                  resolves HTML input-file links (-i -F)
                                     relative to URL
       --config=FILE               specify config file to use
       --no-config                 do not read any config file
       --rejected-log=FILE         log reasons for URL rejection to FILE

Download:
  -t,  --tries=NUMBER              set number of retries to NUMBER (0 unlimits)
       --retry-connrefused         retry even if connection is refused
       --retry-on-http-error=ERRORS    comma-separated list of HTTP errors to retry
  -O,  --output-document=FILE      write documents to FILE
  -nc, --no-clobber                skip downloads that would download to
                                     existing files (overwriting them)
       --no-netrc                  don't try to obtain credentials from .netrc
  -c,  --continue                  resume getting a partially-downloaded file
       --start-pos=OFFSET          start downloading from zero-based position OFFSET
       --progress=TYPE             select progress gauge type
       --show-progress             display the progress bar in any verbosity mode
  -N,  --timestamping              don't re-retrieve files unless newer than
                                     local
       --no-if-modified-since      don't use conditional if-modified-since get
                                     requests in timestamping mode
       --no-use-server-timestamps  don't set the local file's timestamp by
                                     the one on the server
  -S,  --server-response           print server response
       --spider                    don't download anything
  -T,  --timeout=SECONDS           set all timeout values to SECONDS
       --dns-timeout=SECS          set the DNS lookup timeout to SECS
       --connect-timeout=SECS      set the connect timeout to SECS
       --read-timeout=SECS         set the read timeout to SECS
  -w,  --wait=SECONDS              wait SECONDS between retrievals
       --waitretry=SECONDS         wait 1..SECONDS between retries of a retrieval
       --random-wait               wait from 0.5*WAIT...1.5*WAIT secs between retrievals
       --no-proxy                  explicitly turn off proxy
  -Q,  --quota=NUMBER              set retrieval quota to NUMBER
       --bind-address=ADDRESS      bind to ADDRESS (hostname or IP) on local host
       --limit-rate=RATE           limit download rate to RATE
       --no-dns-cache              disable caching DNS lookups
       --restrict-file-names=OS    restrict chars in file names to ones OS allows
       --ignore-case               ignore case when matching files/directories
  -4,  --inet4-only                connect only to IPv4 addresses
  -6,  --inet6-only                connect only to IPv6 addresses
       --prefer-family=FAMILY      connect first to addresses of specified family,
                                     one of IPv6, IPv4, or none
       --user=USER                 set both ftp and http user to USER
       --password=PASS             set both ftp and http password to PASS
       --ask-password              prompt for passwords
       --use-askpass=COMMAND       specify credential handler for requesting
                                     username and password.  If no COMMAND is
                                     specified the WGET_ASKPASS or the SSH_ASKPASS
                                     environment variable is used.
       --no-iri                    turn off IRI support
       --local-encoding=ENC        use ENC as the local encoding for IRIs
       --remote-encoding=ENC       use ENC as the default remote encoding
       --unlink                    remove file before clobber
       --keep-badhash              keep files with checksum mismatch (append .badhash)
       --metalink-index=NUMBER     Metalink application/metalink4+xml metaurl ordinal NUMBER
       --metalink-over-http        use Metalink metadata from HTTP response headers
       --preferred-location        preferred location for Metalink resources

可以将wget添加到环境变量
此电脑,右击,属性,


高级系统设置.png

高级系统设置,环境变量,添加路径即可。


环境变量.png

编写脚本

cat SraAccList.txt |while read id
do
wget -c -6 -nv ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/${id:0:3}/${id:0:6}/$id/${id}.sra
done

相关文章

  • windows下使用wget命令

    win7安装wget 下载包http://downloads.sourceforge.net/gnuwin32/w...

  • Windows下wget命令的使用

    wget在Linux下不用安装,而在Windows下需要安装。学校的Linux下,ipv6时不时的会不能用,当从N...

  • windows下使用wget

    写在最前面:工作中有时候需要测试本地到某网站的下载速度,需要使用到wget,下面接受win7上安装wget步骤一:...

  • Windows 如何使用 wget 命令?

    wget 在 Linux 里是经常用到的下载文件命令,但是在 windows 系统能不能用呢? 答案是可以的,虽然...

  • consul服务器搭建

    安装consul 官网下载合适的版本即可windows下直接下载解压即可linux下可以使用wget命令下载 启动...

  • Windows下Nginx的启动、停止等命令

    Windows下Nginx的启动、停止等命令 Windows下Nginx的启动、停止等命令 在Windows下使用...

  • 文件下载命令

    linux 文件下载命令 wget是linux最常用的下载命令, 一般的使用方法是: wget + 空格 + 要下...

  • wget命令使用

    wget下载的默认路径是什么?关于wget下载的问题我下载了wget这个软件解压到/usr/ProgramFile...

  • wget命令详解

    使用linux下载的时候经常会碰到这个命令,记录一下。 wget命令介绍 wget是Linux中的一个下载文件的工...

  • wget命令的使用

    1、使用wget下载单个文件 以下的例子是从网络下载一个文件并保存在当前目录 wget http://cn.wor...

网友评论

      本文标题:Windows下wget命令的使用

      本文链接:https://www.haomeiwen.com/subject/ekahwctx.html