Coder Social home page Coder Social logo

agherzan / syncit Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 2.0 1.12 MB

Sync files, directories or the entire file-system with durability in mind

License: Apache License 2.0

Makefile 19.79% C 73.20% C++ 7.01%
sync filesystem tools linux c fsync syncfs durability

syncit's Introduction

syncit

This small tool provides the ability to sync files or directories while ensuring durability.

It supports:

  • sync to disk a file or a directory while making sure the parent directory is fsync'ed too
  • sync to disk all the buffered modifications
  • sync to disk the filesystem on which a specific file resides

Install

Do you like Arch Linux? You're in luck: https://aur.archlinux.org/packages/syncit/ . Cheers to <gergely [at] imreh [dot] net>!

Otherwise:

make
make install

How to use

When ran without file argument it will behave as a normal sync. When a file argument is provided the tool will fsync the file (which can be a directory too) and the parent directory to ensure durability of data. When -f option is used, it will sync the entire filesystem the specified file resides on.

Check help:

syncit --help

Contributions

Want to contribute? Great! Throw pull requests at us.

syncit's People

Contributors

agherzan avatar imrehg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

imrehg flaketill

syncit's Issues

Building the package with an AUR helps makes revision not available in version

Because arch doesn't build the package in a git repository, the compilation throws errors like:

git rev-parse --short HEAD | tr -d "\n" >> /tmp/yaourt-tmp-andrei/aur-syncit/src/syncit-0.0.1/include/version.h
fatal: Not a git repository (or any parent up to mount point /tmp)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

As well at runtime the revision is unset:

andrei@carbonA ~ $ syncit --help
syncit v0.0.1+
Usage: syncit [-d|--debug] [-h|--help] [-v|--version] [-f file] [file]
andrei@carbonA ~ $ syncit -v
v0.0.1+

CC @imrehg

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.