In Linux, the FTP site synchronizes a sentence script and the application wget-Linux Enterprise Application-Linux server application information. The following is a detailed description. It is very simple, as follows:
Wget-B-m-nH ftp: // user: passwd@192.168.0.1: 21
Simple explanation:
-B: The application is automatically placed in the background, and the log is output to the wget-log file in the current directory.
-M: mirror, which indicates the image.
-NH: does not generate the directory name of the site. I hate to generate such a directory.
Function: one-way synchronization. Site B is A full image of Site. Since it is synchronous, it will not be downloaded again. Use it with cron.
To put it simply, during the synchronization process, two hidden files are generated at each level on the local side, that is, on the B side. If there is only a directory, only. listing is generated. If there is a file, two files will be generated:
. Listing is used to view directories.
. Tempcrc. jasfv View File and generate the CRC32 verification code for comparison.
By the way, we found that man's help was too long for quick use. -- Help is very useful. Haha.
Many friends on the Internet are looking for this item. In fact, you only need wget -- help to find the answer. BS: I also google for half a day.
By the way, let's take a look at the generated file. Very interesting. I will not post it.
Append:
You still need to make some modifications to call crontab. For example, the path for executing the script, the path for local storage, and the location for log output.
Wget-B-m-nH-P ~ /Localdir-o ~ /Logs/output. log ftp: // user: passwd@192.168.0.1: 21
Append Two Parameters
-P: Specifies the location of the local storage directory after download.
-O: Specify the log output path.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.