如何与Ubuntu One同步配置文件

Ubuntu One lets you easily synchronize files and folders, but it isn’t clear how to sync configuration files. Using Ubuntu One’s folder synchronization options or some symbolic links, you can synchronize configuration files across all your computers.

Ubuntu One使您可以轻松地同步文件和文件夹,但是不清楚如何同步配置文件。 使用Ubuntu One的文件夹同步选项或某些符号链接,您可以在所有计算机之间同步配置文件。

The same method should work with other cloud storage synchronization programs, including Dropbox. It also creates an online backup of your important files, so it’s useful even if you don’t have multiple Ubuntu systems.

相同的方法应适用于其他云存储同步程序,包括Dropbox。 它还会创建重要文件的在线备份,因此即使您没有多个Ubuntu系统,它也很有用。

Ubuntu One安装 (Ubuntu One Setup)

If you haven’t set up Ubuntu One yet, you’ll have to set it up before synchronizing files. Click the mail icon on the panel and select “Ubuntu One.”

如果尚未设置Ubuntu One,则必须在同步文件之前进行设置。 单击面板上的邮件图标,然后选择“ Ubuntu One”

Click the “Join Now” button and create an account.

点击“立即加入”按钮并创建一个帐户。

On your other computers, click the “I already have an account!” link and sign in with your existing account.

在其他计算机上,单击“我已经有一个帐户! ”链接并使用您现有的帐户登录。

After you do this, you’ll get a “Ubuntu One” folder in your home folder. All files in this folder are automatically synchronized between your computers.

完成此操作后,您将在主文件夹中找到一个“ Ubuntu One”文件夹。 此文件夹中的所有文件将在计算机之间自动同步。

同步配置文件夹 (Synchronizing Configuration Folders)

Configuration folders are hidden by default, so you’ll have to click the View menu in the file manager and select “Show Hidden Files” to see them.

默认情况下,配置文件夹是隐藏的,因此您必须单击文件管理器中的“查看”菜单,然后选择“显示隐藏的文件”以查看它们。

Once you have, you’ll see your configuration files. Each begins with a . — this is how files and folders are hidden on Linux.

拥有之后,您将看到您的配置文件。 每个以开头 —这就是在Linux上隐藏文件和文件夹的方式。

Right-click the folder you want to synchronize, point to the Ubuntu One submenu and click “Synchronize This Folder.”

右键单击要同步的文件夹,指向Ubuntu One子菜单,然后单击“同步此文件夹”

A green check mark appears on each folder you’re synchronizing.

一个绿色的复选标记出现在您正在同步的每个文件夹上。

From the Ubuntu One window, you can view all your synchronized folders.

在Ubuntu One窗口中,您可以查看所有同步的文件夹。

Before the folder will synchronize, you’ll have to open the Ubuntu One configuration window on your other computers.

在文件夹同步之前,您必须在其他计算机上打开Ubuntu One配置窗口。

You must enable the “Sync locally?” check box on each other computer.

您必须启用“本地同步? 对方计算机上的”复选框。

Ubuntu One will keep the configuration folder in sync across all your computers.

Ubuntu One将使配置文件夹在所有计算机上保持同步。

Of course, you can use this method to synchronize any folder.

当然,您可以使用此方法来同步任何文件夹。

同步单个文件 (Synchronizing Individual Files)

Ubuntu One won’t let you synchronize a single file from the right-click menu. If you try, you’ll see all the options grayed out.

Ubuntu One不允许您从右键单击菜单同步单个文件。 如果尝试,您会看到所有选项均灰显。

To synchronize a specific configuration file, you’ll have to move it to your Ubuntu One folder. You can do this with the cut and paste option from the file manager or with the mv command in the terminal.

要同步特定的配置文件,您必须将其移动到Ubuntu One文件夹。 您可以使用文件管理器中的剪切和粘贴选项或终端中的mv命令来执行此操作。

Here, we’ve moved our .bashrc file to the Ubuntu One folder. It no longer exists in our home folder.

在这里,我们已将.bashrc文件移至Ubuntu One文件夹。 它不再存在于我们的主文件夹中。

We can use the ln -s command to create a symbolic link from the file in the Ubuntu One directory to the file’s original location. For our .bashrc example, we’d use the following command:

我们可以使用ln -s命令创建从Ubuntu One目录中的文件到文件原始位置的符号链接。 对于我们的.bashrc示例,我们将使用以下命令:

ln -s /home/howtogeek/Ubuntu\ One/.bashrc /home/howtogeek

ln -s / home / howtogeek / Ubuntu \ One / .bashrc / home / howtogeek

In other words, the syntax is:

换句话说,语法为:

ln -s /path/to/file /original/location

ln -s /路径/到/文件/原始/位置

Note that you can’t create a symlink and place it in the Ubuntu One directory. Ubuntu One ignores symlinks.

请注意,您无法创建符号链接并将其放置在Ubuntu One目录中。 Ubuntu One忽略符号链接。

If you check your home folder after this, you’ll see that there’s now a symbolic link to the file in the Ubuntu One folder.

如果在此之后检查您的主文件夹,您将看到在Ubuntu One文件夹中现在有一个指向该文件的符号链接。

On your other computers, you’ll have to delete the original configuration file and run the same command to create the appropriate symlink.

在其他计算机上,您将必须删除原始配置文件并运行相同的命令来创建适当的符号链接。

You can use this method to synchronize any file at any location. Most of the time it will make more sense to copy the file to the Ubuntu One folder, though.

您可以使用此方法在任何位置同步任何文件。 不过,在大多数情况下,将文件复制到Ubuntu One文件夹更有意义。

翻译自: https://www.howtogeek.com/108000/how-to-synchronize-your-configuration-files-with-ubuntu-one/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值