1
我想知道是否有一个命令来下载远程文件夹的内容,即该特定文件夹中包含的所有文件。命令下载远程URL文件夹内容
例如,如果我们采用URL http://plugins.svn.wordpress.org/hello-dolly/trunk/ - 如何可以将包含在中继内的两个文件下载到本地计算机而无需手动下载每个文件?
此外,如果有办法下载所有内容,包括文件和任何列出的很好的子目录。
我想知道是否有一个命令来下载远程文件夹的内容,即该特定文件夹中包含的所有文件。命令下载远程URL文件夹内容
例如,如果我们采用URL http://plugins.svn.wordpress.org/hello-dolly/trunk/ - 如何可以将包含在中继内的两个文件下载到本地计算机而无需手动下载每个文件?
此外,如果有办法下载所有内容,包括文件和任何列出的很好的子目录。
如果您需要下载整个网站,或许用于离线查看,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).
我,只要我有一个问题解决了尝试。显然,我的Mac终端没有wget - 所以我试着下载wget源文件和'。/ configure',但得到一个'configure:error:$ PATH中没有可接受的C编译器'。我刚刚看到这个问题可能与Xcode没有被安装有关,但它已经安装。任何想法@kev? – mousesports 2012-03-11 15:39:20