https://github.com/xingshuo/file-sync
An auto sync the changes dir/file to remote server tool via ssh/sftp
https://github.com/xingshuo/file-sync
filesync
Last synced: 6 months ago
JSON representation
An auto sync the changes dir/file to remote server tool via ssh/sftp
- Host: GitHub
- URL: https://github.com/xingshuo/file-sync
- Owner: xingshuo
- License: mit
- Created: 2018-10-29T19:06:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-06-08T02:58:48.000Z (about 1 year ago)
- Last Synced: 2025-08-15T02:29:17.518Z (11 months ago)
- Topics: filesync
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 6
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
FileSync
=========
An auto sync the changes dir/file to remote server tool via ssh/sftp.
Wiki
----
基于golang编写的文件自动同步工具,支持通过终端命令同步或删除指定文件或目录(use 'help' for usage)
前置环境
-----
golang
支持平台
-----
Linux/Windows
安装
-----
1. git clone https://github.com/xingshuo/file-sync.git
2. cd file-sync && go build
运行
-----
1. run "file-sync" or "file-sync.exe"(windows) 默认读取config.json配置启动
2. run "file-sync -config=filename" or "file-sync.exe -config=filename" 读取指定filename文件作为配置启动
Tips
-----
1. go get过程中出现package golang.org/x/sys/unix: unrecognized import path "golang.org/x/sys/unix"报错,解决方案参考:
https://javasgl.github.io/go-get-golang-x-packages/
2. 由于fsnotify库实现问题,本工具只监听:文件/目录的create write remove事件(放弃rename事件监听),创建文件/目录,修改文件,删除文件或目录操作均可自动同步远端.
但文件/目录重命名仅会自动同步更名后的目标到远端,旧的文件/目录不会自动从远端移除,有需要可通过终端remove命令手动移除