LinuxCommandLibrary

unison

TLDR

Sync directories

$ unison [dir1] [dir2]
copy
Sync with SSH
$ unison [local/path] ssh://[user@host]/[path]
copy
Batch mode
$ unison -batch [dir1] [dir2]
copy
Use profile
$ unison [profilename]
copy
Show differences
$ unison -diff [dir1] [dir2]
copy

SYNOPSIS

unison [-batch] [profile] root1 root2

DESCRIPTION

unison synchronizes files. It's bidirectional sync.
Two-way sync. Changes both directions.
Conflict detection. Manual resolution.
SSH support. Remote sync.
Profiles. Save configurations.

PARAMETERS

-batch

Non-interactive.
-auto
Accept defaults.
-diff
Show differences.
-force ROOT
Force from root.
-ignore PATTERN
Ignore pattern.
-path PATH
Sync specific path.

CAVEATS

Same version both ends. Conflicts need attention. Initial sync slow.

HISTORY

Unison was developed at the University of Pennsylvania as a file synchronization tool supporting bidirectional sync.

SEE ALSO

rsync(1), syncthing(1), rclone(1)

Copied to clipboard