Forrest logo
back to the unison tool

unison:tldr:4e256

unison: Sync two directories (creates log first time these two directories are synchronized).
$ unison ${path-to-directory_1} ${path-to-directory_2}
try on your machine

The command unison ${path-to-directory_1} ${path-to-directory_2} is used to synchronize the contents of two directories. Here's an explanation of the different components:

  1. unison: It is the name of the command-line utility used for file synchronization.

  2. ${path-to-directory_1}: This is a placeholder representing the path to the first directory you want to synchronize. You need to replace it with the actual path, such as /home/user/directory1 or C:\Users\User\Documents\directory1.

  3. ${path-to-directory_2}: Similarly, this placeholder represents the path to the second directory you want to synchronize. Replace it with the actual path of the second directory, such as /home/user/directory2 or C:\Users\User\Documents\directory2.

With this command, unison compares the files and folders in the two specified directories and performs bidirectional synchronization between them. It identifies differences in file content, creation, modification times, and deletion, and mirrors the changes from one directory to the other.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the unison tool