首页 > 其他 > 详细

【wget】wget的ftp相关功能

时间:2014-12-24 18:20:15      阅读:279      评论:0      收藏:0      [点我收藏+]

【wget下载ftp中的文件】wget的ftp相关功能

saveto=文件保存路径

URL=ftp路径

wgetlog=wget日志文件路径

wget -P ${saveto} --ftp-user=xxx --ftp-password=xxx -m -c -t5 ${URL} -a ${wgetlog} -nv

       -o logfile
       --output-file=logfile
           Log all messages to logfile.  The messages are normally reported to standard error.

       -a logfile
       --append-output=logfile
           Append to logfile.  This is the same as -o, only it appends to logfile instead of
           overwriting the old log file.  If logfile does not exist, a new file is created.


       -nv
       --no-verbose
           Turn off verbose without being completely quiet (use -q for that), which means that
           error messages and basic information still get printed.
		   
   Download Options
		-t number
       --tries=number
           Set number of retries to number.  Specify 0 or inf for infinite retrying.  The
           default is to retry 20 times, with the exception of fatal errors like "connection
           refused" or "not found" (404), which are not retried.		   
		   
       -O file
       --output-document=file
           The documents will not be written to the appropriate files, but all will be
           concatenated together and written to file.  If - is used as file, documents will be
           printed to standard output, disabling link conversion.  (Use ./- to print to a file
           literally named -.)

       -c
       --continue
           Continue getting a partially-downloaded file.  This is useful when you want to
           finish up a download started by a previous instance of Wget, or by another program.
           For instance:

                   wget -c ftp://sunsite.doc.ic.ac.uk/ls-lR.Z

           If there is a file named ls-lR.Z in the current directory, Wget will assume that it
           is the first portion of the remote file, and will ask the server to continue the
           retrieval from an offset equal to the length of the local file.	

       -P prefix
       --directory-prefix=prefix
           Set directory prefix to prefix.  The directory prefix is the directory where all
           other files and subdirectories will be saved to, i.e. the top of the retrieval
           tree.  The default is . (the current directory).

       -m
       --mirror
           Turn on options suitable for mirroring.  This option turns on recursion and time-
           stamping, sets infinite recursion depth and keeps FTP directory listings.  It is
           currently equivalent to -r -N -l inf --no-remove-listing.		


【wget】wget的ftp相关功能

原文:http://nosmoking.blog.51cto.com/3263888/1595248

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!