LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1146|回复: 11

如何从web网站上把某个目录链接下的所有内容整个的作为一个目录拽下来?

[复制链接]
发表于 2005-9-9 10:31:08 | 显示全部楼层 |阅读模式
如题,不知道到有什么办法没有?
发表于 2005-9-9 10:49:02 | 显示全部楼层
wget -m
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-9-9 11:11:32 | 显示全部楼层
能具体点吗?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-9-10 15:41:46 | 显示全部楼层
顶一个!
回复 支持 反对

使用道具 举报

发表于 2005-9-10 20:37:27 | 显示全部楼层
httrack 离线浏览器 有图形界面
http://www.linuxsir.cn/bbs/showt ... p;highlight=httrack
回复 支持 反对

使用道具 举报

发表于 2005-9-10 21:10:47 | 显示全部楼层
Post by jsean
能具体点吗?


看 man wget 就全知道了

例:
wget -m   http://www.jseam.xxx/yy/1

就会把   http://www.jseam.xxx/yy/1 下的所有东西弄下来
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-9-11 13:28:00 | 显示全部楼层
不对呀,我就是这么执行的,可是怎么好象命令的结果是把整个根目录下所有的东西给下载下来的呢?
回复 支持 反对

使用道具 举报

发表于 2005-9-11 15:02:27 | 显示全部楼层
我一般是用wget -r -np
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-9-11 16:29:16 | 显示全部楼层
楼上的兄弟,能不能解释一下你用的那几个参数的意思?
回复 支持 反对

使用道具 举报

发表于 2005-9-11 19:00:40 | 显示全部楼层
wget -h一下呀,里面很多

  1. $ wget -h
  2. GNU Wget 1.10.1,非交互式的网络文件下载工具。
  3. 用法: wget [选项]... [URL]...

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

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

  10. Logging and input file:
  11.   -o,  --output-file=FILE    log messages to FILE.
  12.   -a,  --append-output=FILE  append messages to FILE.
  13.   -d,  --debug               print lots of debugging information.
  14.   -q,  --quiet               quiet (no output).
  15.   -v,  --verbose             be verbose (this is the default).
  16.   -nv, --no-verbose          turn off verboseness, without being quiet.
  17.   -i,  --input-file=FILE     download URLs found in FILE.
  18.   -F,  --force-html          treat input file as HTML.
  19.   -B,  --base=URL            prepends URL to relative links in -F -i file.

  20. Download:
  21.   -t,  --tries=NUMBER            set number of retries to NUMBER (0 unlimits).
  22.        --retry-connrefused       retry even if connection is refused.
  23.   -O,  --output-document=FILE    write documents to FILE.
  24.   -nc, --no-clobber              skip downloads that would download to
  25.                                  existing files.
  26.   -c,  --continue                resume getting a partially-downloaded file.
  27.        --progress=TYPE           select progress gauge type.
  28.   -N,  --timestamping            don't re-retrieve files unless newer than
  29.                                  local.
  30.   -S,  --server-response         print server response.
  31.        --spider                  don't download anything.
  32.   -T,  --timeout=SECONDS         set all timeout values to SECONDS.
  33.        --dns-timeout=SECS        set the DNS lookup timeout to SECS.
  34.        --connect-timeout=SECS    set the connect timeout to SECS.
  35.        --read-timeout=SECS       set the read timeout to SECS.
  36.   -w,  --wait=SECONDS            wait SECONDS between retrievals.
  37.        --waitretry=SECONDS       wait 1..SECONDS between retries of a retrieval.       --random-wait             wait from 0...2*WAIT secs between retrievals.
  38.   -Y,  --proxy                   explicitly turn on proxy.
  39.        --no-proxy                explicitly turn off proxy.
  40.   -Q,  --quota=NUMBER            set retrieval quota to NUMBER.
  41.        --bind-address=ADDRESS    bind to ADDRESS (hostname or IP) on local host.       --limit-rate=RATE         limit download rate to RATE.
  42.        --no-dns-cache            disable caching DNS lookups.
  43.        --restrict-file-names=OS  restrict chars in file names to ones OS allows.  -4,  --inet4-only              connect only to IPv4 addresses.
  44.   -6,  --inet6-only              connect only to IPv6 addresses.
  45.        --prefer-family=FAMILY    connect first to addresses of specified family,                                 one of IPv6, IPv4, or none.
  46.        --user=USER               set both ftp and http user to USER.
  47.        --password=PASS           set both ftp and http password to PASS.

  48. Directories:
  49.   -nd, --no-directories           don't create directories.
  50.   -x,  --force-directories        force creation of directories.
  51.   -nH, --no-host-directories      don't create host directories.
  52.        --protocol-directories     use protocol name in directories.
  53.   -P,  --directory-prefix=PREFIX  save files to PREFIX/...
  54.        --cut-dirs=NUMBER          ignore NUMBER remote directory components.

  55. HTTP options:
  56.        --http-user=USER        set http user to USER.
  57.        --http-password=PASS    set http password to PASS.
  58.        --no-cache              disallow server-cached data.
  59.   -E,  --html-extension        save HTML documents with `.html' extension.
  60.        --ignore-length         ignore `Content-Length' header field.
  61.        --header=STRING         insert STRING among the headers.
  62.        --proxy-user=USER       set USER as proxy username.
  63.        --proxy-password=PASS   set PASS as proxy password.
  64.        --referer=URL           include `Referer: URL' header in HTTP request.
  65.        --save-headers          save the HTTP headers to file.
  66.   -U,  --user-agent=AGENT      identify as AGENT instead of Wget/VERSION.
  67.        --no-http-keep-alive    disable HTTP keep-alive (persistent connections).       --no-cookies            don't use cookies.
  68.        --load-cookies=FILE     load cookies from FILE before session.
  69.        --save-cookies=FILE     save cookies to FILE after session.
  70.        --keep-session-cookies  load and save session (non-permanent) cookies.
  71.        --post-data=STRING      use the POST method; send STRING as the data.
  72.        --post-file=FILE        use the POST method; send contents of FILE.

  73. HTTPS (SSL/TLS) options:
  74.        --secure-protocol=PR     choose secure protocol, one of auto, SSLv2,
  75.                                 SSLv3, and TLSv1.
  76.        --no-check-certificate   don't validate the server's certificate.
  77.        --certificate=FILE       client certificate file.
  78.        --certificate-type=TYPE  client certificate type, PEM or DER.
  79.        --private-key=FILE       private key file.
  80.        --private-key-type=TYPE  private key type, PEM or DER.
  81.        --ca-certificate=FILE    file with the bundle of CA's.
  82.        --ca-directory=DIR       directory where hash list of CA's is stored.
  83.        --random-file=FILE       file with random data for seeding the SSL PRNG.
  84.        --egd-file=FILE          file naming the EGD socket with random data.

  85. FTP options:
  86.        --ftp-user=USER         set ftp user to USER.
  87.        --ftp-password=PASS     set ftp password to PASS.
  88.        --no-remove-listing     don't remove `.listing' files.
  89.        --no-glob               turn off FTP file name globbing.
  90.        --no-passive-ftp        disable the "passive" transfer mode.
  91.        --retr-symlinks         when recursing, get linked-to files (not dir).
  92.        --preserve-permissions  preserve remote file permissions.

  93. Recursive download:
  94.   -r,  --recursive          specify recursive download.
  95.   -l,  --level=NUMBER       maximum recursion depth (inf or 0 for infinite).
  96.        --delete-after       delete files locally after downloading them.
  97.   -k,  --convert-links      make links in downloaded HTML point to local files.
  98.   -K,  --backup-converted   before converting file X, back up as X.orig.
  99.   -m,  --mirror             shortcut for -N -r -l inf --no-remove-listing.
  100.   -p,  --page-requisites    get all images, etc. needed to display HTML page.
  101.        --strict-comments    turn on strict (SGML) handling of HTML comments.

  102. Recursive accept/reject:
  103.   -A,  --accept=LIST               comma-separated list of accepted extensions.
  104.   -R,  --reject=LIST               comma-separated list of rejected extensions.
  105.   -D,  --domains=LIST              comma-separated list of accepted domains.
  106.        --exclude-domains=LIST      comma-separated list of rejected domains.
  107.        --follow-ftp                follow FTP links from HTML documents.
  108.        --follow-tags=LIST          comma-separated list of followed HTML tags.
  109.        --ignore-tags=LIST          comma-separated list of ignored HTML tags.
  110.   -H,  --span-hosts                go to foreign hosts when recursive.
  111.   -L,  --relative                  follow relative links only.
  112.   -I,  --include-directories=LIST  list of allowed directories.
  113.   -X,  --exclude-directories=LIST  list of excluded directories.
  114.   -np, --no-parent                 don't ascend to the parent directory.

  115. 请将错误报告或建议寄给 <bug-wget@gnu.org>。
复制代码
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表