Home > Article > System Tutorial > Compare and sync files in Ubuntu with FreeFileSync
FreeFileSync is a free, open source, and cross-platform folder comparison and synchronization software that can help you synchronize files and folders in Linux, Windows, and Mac OS.
It is portable and can also be installed on the local system. It is feature-rich and designed to save time in setting up and performing backup operations, while having an attractive graphical interface.
The following are its main functions:
We will add the official FreeFileSync PPA, which is only available on Ubuntu 14.04 and Ubuntu 15.10, so update the system repository list and install it like this:
-------------- 在 Ubuntu 14.04 和 15.10 上 -------------- $ sudo apt-add-repository ppa:freefilesync/ffs $ sudo apt-get update $ sudo apt-get install freefilesync
For Ubuntu 16.04 or newer, go to the FreeFileSync download page to get the appropriate package for your Ubuntu and Debian.
Next, enter the download folder and unzip FreeFileSync_*.tar.gz as follows to the /opt directory:
$ cd Downloads/ $ sudo tar xvf FreeFileSync_*.tar.gz -C /opt/ $ cd /opt/ $ ls $ sudo unzip FreeFileSync/Resources.zip -d /opt/FreeFileSync/Resources/
Download We will create a program launcher (.desktop file) using the Gnome panel. To browse for examples of .desktop files on your system, list the contents of the /usr/share/applications directory:
$ ls /usr/share/applications
In case you don’t have Gnome Panel installed, enter the following command to install it:
$ sudo apt-get install --no-install-recommends gnome-panel
Next, run the following command to create the program launcher:
$ sudo gnome-desktop-item-edit /usr/share/applications/ --create-new
and define the following values:
Type: Application Name: FreeFileSync Command: /opt/FreeFileSync/FreeFileSync Comment: Folder Comparison and Synchronization
To add an icon to the launcher, just click on the icon selection: /opt/FreeFileSync/Resources/FreeFileSync.png.
After you complete the settings, click OK to create.
Create desktop launcher
If you don't want to create a desktop launcher, you can launch FreeFileSync from a directory.
$ ./FreeFileSync
在 Ubuntu 中,在 Unity Dash 中搜索 FreeFileSync,然而在 Linux Mint 中,在 System Menu 中搜索,并点击 FreeFileSync 图标打开。
FreeFileSync
在下面的例子中,我们使用:
Source Folder: /home/aaronkilik/bin Destination Folder: /media/aaronkilik/J_CPRA_X86F/scripts
要比较文件时间以及两个文件夹的大小(默认设置),只要点击比较按钮。
在 Linux 中比较两个文件夹
通过下面的界面,可以在两个文件夹中按 F6 来更改要比较的内容:文件时间和大小、内容或文件大小。请注意,你选择的每个选项的含义也包括在内。
文件比较设置
你可以开始比较两个文件夹,接着点击 Synchronize 按钮启动同步进程。在之后出现的对话框中点击 Start:
Source Folder: /home/aaronkilik/Desktop/tecmint-files Destination Folder: /media/aaronkilik/Data/Tecmint
比较以及同步两个文件夹
开始文件同步
文件同步完成
在下面的界面中按下 F8 设置默认同步选项:two way、mirror、update 或 custom。每个选项的意义不言自明。
文件同步设置
要了解更多信息,访问 FreeFileSync 主页:http://www.freefilesync.org/
The above is the detailed content of Compare and sync files in Ubuntu with FreeFileSync. For more information, please follow other related articles on the PHP Chinese website!