Code Monkey home page Code Monkey logo

file-sync's Introduction

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命令手动移除

file-sync's People

Contributors

xingshuo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

file-sync's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.