So I am new to bash programming, and I am trying to write a program that automatically syncs files between my pc and laptop. Both use ubuntu 19. I have a folder called ~/share on both computers, and I was wondering what methods would be the best to use to sync these folders. I heard rsync might work, I was just looking for imput.


Try unison Or rsync -u -aSH

The -u is important to not overwrite files that are newer on the other side.

The other way I really like as a programmer, is to use a git repo. This will keep the full change history and do better merges of offline changes and allow for multiple backup locations.

  • Using git is good idea, but not for this use-case. There is no automatically syncing and the permanent history will take a lot of space if he has large files.
    – Garo
    Dec 25 '19 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.