Unit of speed since two months ago has made strides into the "Cuban era", slow and heinous AH!!! , although there is not much time to install the software, but always have to use the time, or first build a local Epel source bar.
Know that there is a wget command can be bulk download some files, but not how to use before (professional rookie 30 years, forgive manual squint), now re-learn how to use the next (why to say again, will not manually despise the expression).
Now to the image used by the command to write to this, in case there is a professional like me white can't wait to read, this again spit trough a cloud server, incredibly don't let use wget mirror entire site, forgive my purity, amen ~!
~]# wget-b-q-np-nh--cut-dirs=1-r-c-l--exclude-directories=repodata,repoview--accept=rpm,gz,xml http://dl.fedorap roject.org/pub/epel/6/x86_64/-p/var/www/
Note : You can change the directory specified by-p to a different server directory (it is recommended to leave a 50G, after all, the software is quite a lot ~).
Because consulted the next some of the predecessors of the use of the tutorial, forgive in the next Caishuxueqian, they say that most of the words are official documents translated, do not understand ╮(╯▽╰)╭, the following will be used in the above some of the options to the gray often amateur to explain, in case later use to forget (it is completely remind yourself ah, Let the fat cows laugh.
Options:
(1)-b,--background: The wget command is removed from the terminal and transferred to the backstage operation;
(2)-q:quiet, silent mode, do not output information;
(3)-r,--recursive: Specify recursive download, do not use this option to download directory content.
(4)-np,--no-parent: Do not trace the parent directory, this option is guaranteed to download only the content under the specified directory, not to download all the content in the root directory.
Note:www.centos.com This is for testing.
Example:
~]# wget-np-r http://www.centos.com/pub/epel/7/x86_64/-p/tmp/test
When the NP option is specified, all content under the x86_64 directory is downloaded to the/tmp/test directory only.
(5)-nh,--no-host-directories: Do not create host directory.
Example:
~]# wget-np-r-nh http://www.centos.com/pub/epel/7/x86_64/-p/tmp/test
Adding the-NH option does not create a directory named www.centos.com in the test directory, but instead creates a/pub/epel/7/x86_64 directory in the test directory.
(6)--cut-dirs=#: Ignore the # Layer remote directory, the meaning of this option is more convenient.
Example:
~]# wget--cut-dirs=1-r http://www.centos.com/pub/epel/7/x86_64/-p/tmp/test
When you specify that the number of layers to ignore is 1 o'clock, the/tmp/test directory generates
Www.centos.com
|
|--epel
|
|--7
|
|--x86_64
This type of directory, the original pub directory is omitted (equal to the original created in the pub directory of all the files and directories directly created under the www.centos.com "root directory").
The purpose of this option is to reduce the number of directory layers for downloaded content, and the original file will not be downloaded less because of the specified number of layers.
(7)-c,--continue: The breakpoint continues to transmit the function.
(8)-l,--releative: Track only links that are related. This option is important for a Web page file, such as a style file on a page, and the referenced style file is downloaded locally.
(9)-x,--exclude-directories=list: Excludes directories in the specified list.
Example:
~]# wget-r-c-l--cut-dirs=1-np-nh-q-p/tmp/test/--exclude-directories=*/x86_64/repodata/http://www.centos.com/pu b/epel/7/x86_64/
With the--exclude-directories option, if the directory is repodata under the specified path, the contents will be ignored and not downloaded.
Note: The directory specified here must be an absolute path, the * number indicates the path before the last level of the URL, which is not reflected in the manual (and may not be read).
-a,--accept=list: Allow the file extension to be downloaded, with multiple words separated by commas.
(one)-r,--reject=list: opposite to-a function.
-n,--timestamping: This option is relatively important, when building a local Epel source, you can build a script to download the package to the remote server regularly, using the-N option will be local and remote, the server will ignore the same package without updating.
-l,--level=number: Specifies the maximum recursion depth (number is info or 0 for infinity, i.e. all downloads).
After testing, this option seems to have no effect!
-o,--output-file=file: The display information from the download can be saved to the specified file and can be queried as a log.
Note: Using this option requires the-Q (silent mode) to be turned off.
The most common options for mirroring are these, other throttling speeds, FTP downloads, and proxy usage, which are not used here, and are not mentioned.
This article from "Product small stream, into Jianghai" blog, please be sure to keep this source http://goodjoe.blog.51cto.com/9173556/1884877
Linux notes--use wget to mirror Epel source