1 changed files with 21 additions and 2 deletions
@ -1,2 +1,21 @@ |
|||||
# File Synchronizer |
# 文件同步工具 |
||||
Written in C, File Synchronizer is a program that copies files and/or directories from a host computer to a remote server. If the directories already exist on the server the program updates the files if any changes have been made. To check if any changes have been made the program compares the file sizes, permission, and their hash values. The hash value for a file is generated using a XOR hashing algorithm. The information is transferred byte by byte through a TCP socket. |
rc_server 为接收端,rc_client 发送端 |
||||
|
|
||||
|
举个例子: |
||||
|
接收端A服务器(IP:192.168.1.20),文件接收的存放位置 /root/01 , 使用的端口 57653,记得防火墙开启端口。 |
||||
|
|
||||
|
1、在A服务器上执行如下命令 |
||||
|
```bash |
||||
|
./rc_sersver /root/01 |
||||
|
``` |
||||
|
|
||||
|
2、发送端 |
||||
|
|
||||
|
将/www/00 下的文件同步到 A服务器上,执行命令 |
||||
|
|
||||
|
```bash |
||||
|
./rc_client /www/00/ 192.168.1.20 |
||||
|
``` |
||||
|
|
||||
|
3、同步的文件继续保持原有属性,如只读只写等 |
||||
|
|
||||
|
|||||
Loading…
Reference in new issue