Skip to content

An auto sync the changes dir/file to remote server tool via ssh/sftp

License

Notifications You must be signed in to change notification settings

xingshuo/file-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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. go get -v -u -x github.com/xingshuo/file-sync
2. git clone https://github.com/xingshuo/file-sync.git
3. 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命令手动移除

About

An auto sync the changes dir/file to remote server tool via ssh/sftp

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages