特殊:Badtitle/NS100:Unison
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/Unison }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/af | • {{#if: UbuntuHelp:Unison|Afrikaans| [[::Unison/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/ar | • {{#if: UbuntuHelp:Unison|العربية| [[::Unison/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/az | • {{#if: UbuntuHelp:Unison|azərbaycanca| [[::Unison/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/bcc | • {{#if: UbuntuHelp:Unison|جهلسری بلوچی| [[::Unison/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/bg | • {{#if: UbuntuHelp:Unison|български| [[::Unison/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/br | • {{#if: UbuntuHelp:Unison|brezhoneg| [[::Unison/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/ca | • {{#if: UbuntuHelp:Unison|català| [[::Unison/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/cs | • {{#if: UbuntuHelp:Unison|čeština| [[::Unison/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/de | • {{#if: UbuntuHelp:Unison|Deutsch| [[::Unison/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/el | • {{#if: UbuntuHelp:Unison|Ελληνικά| [[::Unison/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/es | • {{#if: UbuntuHelp:Unison|español| [[::Unison/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/fa | • {{#if: UbuntuHelp:Unison|فارسی| [[::Unison/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/fi | • {{#if: UbuntuHelp:Unison|suomi| [[::Unison/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/fr | • {{#if: UbuntuHelp:Unison|français| [[::Unison/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/gu | • {{#if: UbuntuHelp:Unison|ગુજરાતી| [[::Unison/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/he | • {{#if: UbuntuHelp:Unison|עברית| [[::Unison/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/hu | • {{#if: UbuntuHelp:Unison|magyar| [[::Unison/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/id | • {{#if: UbuntuHelp:Unison|Bahasa Indonesia| [[::Unison/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/it | • {{#if: UbuntuHelp:Unison|italiano| [[::Unison/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/ja | • {{#if: UbuntuHelp:Unison|日本語| [[::Unison/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/ko | • {{#if: UbuntuHelp:Unison|한국어| [[::Unison/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/ksh | • {{#if: UbuntuHelp:Unison|Ripoarisch| [[::Unison/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/mr | • {{#if: UbuntuHelp:Unison|मराठी| [[::Unison/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/ms | • {{#if: UbuntuHelp:Unison|Bahasa Melayu| [[::Unison/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/nl | • {{#if: UbuntuHelp:Unison|Nederlands| [[::Unison/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/no | • {{#if: UbuntuHelp:Unison|norsk| [[::Unison/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/oc | • {{#if: UbuntuHelp:Unison|occitan| [[::Unison/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/pl | • {{#if: UbuntuHelp:Unison|polski| [[::Unison/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/pt | • {{#if: UbuntuHelp:Unison|português| [[::Unison/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/ro | • {{#if: UbuntuHelp:Unison|română| [[::Unison/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/ru | • {{#if: UbuntuHelp:Unison|русский| [[::Unison/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/si | • {{#if: UbuntuHelp:Unison|සිංහල| [[::Unison/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/sq | • {{#if: UbuntuHelp:Unison|shqip| [[::Unison/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/sr | • {{#if: UbuntuHelp:Unison|српски / srpski| [[::Unison/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/sv | • {{#if: UbuntuHelp:Unison|svenska| [[::Unison/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/th | • {{#if: UbuntuHelp:Unison|ไทย| [[::Unison/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/tr | • {{#if: UbuntuHelp:Unison|Türkçe| [[::Unison/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/vi | • {{#if: UbuntuHelp:Unison|Tiếng Việt| [[::Unison/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/yue | • {{#if: UbuntuHelp:Unison|粵語| [[::Unison/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/zh | • {{#if: UbuntuHelp:Unison|中文| [[::Unison/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/zh-hans | • {{#if: UbuntuHelp:Unison|中文(简体)| [[::Unison/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Unison | UbuntuHelp:Unison | {{#if: | :}}Unison}}/zh-hant | • {{#if: UbuntuHelp:Unison|中文(繁體)| [[::Unison/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:Unison|:Unison|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :Unison/zh | | {{#ifexist: Unison/zh | | {{#ifeq: {{#titleparts:Unison|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:Unison|1|-1|}} | zh | | }}
About
From the Unison website: Unison is a file-synchronization tool for Unix and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other.
Installation
Unison can be found in Ubuntu's Universe software repository, in the unison package. See InstallingSoftware for information about installing software, and UbuntuHelp:Repositories if you need help enabling Universe. In order to use Unison with Ubuntu and Microsoft Windows, you will need to have Samba installed and setup. For instructions on setting up Samba in Ubuntu, visit the SettingUpSamba wiki page.
GUI Configuration
Unison uses Profiles, this refers to the two root (directories) that are to be synchronized. On starting Unison via the Applications menu you will be presented with a window that allows you to select an existing profile or create a new one. On selecting Create New Profile you will be asked to enter a profile name, such as "USB Stick". Once named the profile can be selected. As the profile is new Unison will guide you though the steps of setting the roots. The first root should be a local directory for example /home/[Username]/work/. The second root can be local or on a target machine. Unison allows synchronization to be carried out over a network using SHH (Further information at UbuntuHelp:SSHHowto), RSH or a specific port on the target machine. Notice the Help button, this gives more information on setting up of remote access. Once this is complete Unison will scan the two locations and show the differences.
Command Line usage
Unison can be invoked from the command line. This makes it a useful program for writing backup scripts that clone two directories. The following is a simple example to synchronize a music directory between two PC's.
unison /home/[Username]/MyMusic /location_of_samba_directory
Or if a profile has been created.
unison "USB Stick"
Notice you do not need to specify a path, Unison searches in /home/[Username]/.unison/ for a corresponding profile. Depending on the size of the directories and the amount of files, a good amount of time may be needed. Unison can be setup to run on a schedule. This can be done by utilizing the "cron" scheduler. Further information regarding cron can be found at the CronHowto wiki page.
Further Help
Included in Unison is a great help section, it can be found via the GUI under Help. Its topics include the different interfaces, the basic concepts and ways of running Unison. I would highly recommend reading this for more detailed information. Unison has many command line options available, for more information type
man unison
or
unison --help