2012-03-11 57 views

回答

1

如果您需要下载整个网站,或许用于离线查看,wget可以完成这项工作。
例如:

$ wget \ 
    --recursive \ 
    --no-clobber \ 
    --page-requisites \ 
    --html-extension \ 
    --convert-links \ 
    --restrict-file-names=windows \ 
    --domains wordpress.org \ 
    --no-parent \ 
     http://plugins.svn.wordpress.org/hello-dolly/trunk/ 

此命令下载网站http://plugins.svn.wordpress.org/hello-dolly/trunk/

的选项有:

--recursive: download the entire Web site. 
--domains wordpress.org: don't follow links outside wordpress.org. 
--no-parent: don't follow links outside the directory tutorials/html/. 
--page-requisites: get all the elements that compose the page (images, CSS and so on). 
--html-extension: save files with the .html extension. 
--convert-links: convert links so that they work locally, off-line. 
--restrict-file-names=windows: modify filenames so that they will work in Windows as well. 
--no-clobber: don't overwrite any existing files (used in case the download is interrupted and resumed). 
+0

我,只要我有一个问题解决了尝试。显然,我的Mac终端没有wget - 所以我试着下载wget源文件和'。/ configure',但得到一个'configure:error:$ PATH中没有可接受的C编译器'。我刚刚看到这个问题可能与Xcode没有被安装有关,但它已经安装。任何想法@kev? – mousesports 2012-03-11 15:39:20