os 移动文件夹_如何将OS X上的特殊文件夹移动到云存储

os 移动文件夹_如何将OS X上的特殊文件夹移动到云存储

os 移动文件夹

os 移动文件夹_如何将OS X上的特殊文件夹移动到云存储

Special folders work well because they centralize where particular types of files are saved. Add in cloud storage, and suddenly you have automatic and effortless backups of your most important personal files.

特殊文件夹可以很好地工作,因为它们可以集中保存特定类型文件的位置。 加上云存储,突然之间,您可以轻松轻松地自动备份最重要的个人文件。

It’s no secret we like the combination of special folders and cloud backups. It’s effective and efficient, taking much of the onus off the user. It is as backups should be but, of course, you still have to put in the initial work to set it up. Moving special folders to a Dropbox or OneDrive folder on Windows is an easy process. Simply, open its properties and move it to a new location.

我们喜欢特殊文件夹和云备份结合,这已经不是什么秘密了。 它高效有效,减轻了用户的负担。 就像备份一样,但是,当然,您仍然需要进行初始工作来进行设置。 在Windows上将特殊文件夹移动到Dropbox或OneDrive文件夹是一个简单的过程。 只需打开其属性并将其移动到新位置。

os 移动文件夹_如何将OS X上的特殊文件夹移动到云存储

The process on Mac OS X is a bit more complicated, requiring you to first move your special folder to the cloud folder and then create a symbolic link from the new location to the old one. It’s worth it, in our opinion, not simply for the backup angle we mentioned already, but to also share data seamlessly between different operating systems.

Mac OS X上的过程有点复杂,需要您首先将特殊文件夹移动到云文件夹,然后从新位置到旧位置创建符号链接。 我们认为,这不仅值得我们已经提到的备份角度,而且还可以在不同操作系统之间无缝共享数据,这是值得的。

移动和链接新的特殊云文件夹 (Moving and Linking Your New Special Cloud Folder)

To begin, first open up the terminal. The easiest way to do this is to use Spotlight, hit “COMMAND + SPACE” and type “terminal”. Make sure you’re in your user folder (it should open there by default).

首先,首先打开终端。 最简单的方法是使用Spotlight,点击“命令+空格”,然后键入“终端”。 确保您位于用户文件夹中(默认情况下应在该文件夹中打开)。

os 移动文件夹_如何将OS X上的特殊文件夹移动到云存储

The commands we’re using looks like this:

我们使用的命令如下所示:

sudo mv ~/Documents /Users/username/OneDrive/Documents

sudo mv〜/ Documents / Users / 用户名 / OneDrive / Documents

ln -s “/Users/username/OneDrive/Documents” ~/Documents

ln -s “ /用户/ 用户名 / OneDrive /文档” 〜/文档

The first command tells us we’re moving (mv) the Documents folder in our current directory to our cloud folder (OneDrive), as a superuser (sudo). Why do we do this as superuser? Sudo temporarily grants a normal user root-like or administrator powers, where otherwise the system would tell us we didn’t have permission.

第一条命令告诉我们,我们将以超级用户(sudo)的形式将当前目录中的Documents文件夹移动(mv)到云文件夹(OneDrive)中。 为什么我们以超级用户身份这样做? Sudo临时授予普通用户类似root或管理员的权限,否则系统会告诉我们我们没有权限。

os 移动文件夹_如何将OS X上的特殊文件夹移动到云存储

The second command “ln -s” means we’re creating a symbolic link (alias) to our old Documents location from our new location. When you hit “RETURN”, you will then be prompted for your account password before you can execute a command as superuser.

第二个命令“ ln -s”表示我们正在从新位置创建到旧文档位置的符号链接(别名)。 当您单击“返回”时,系统将提示您输入帐户密码,然后才能以超级用户身份执行命令。

If successful, the terminal window won’t return any errors and you should be able to “Go” directly to your new Documents folder location from the Finder. If it doesn’t work, then you probably typed something incorrectly. Double-check your work and try it again.

如果成功,则终端窗口将不会返回任何错误,您应该能够从Finder直接“转到”新的Documents文件夹位置。 如果它不起作用,则您可能输入了错误的内容。 仔细检查您的工作,然后重试。

os 移动文件夹_如何将OS X上的特殊文件夹移动到云存储

From here on, any applications that use OS X’s Documents folder as a default save location will think they’re saving to the old location in the root of our user folder, when it’s actually saving them to OneDrive. Also, the shortcut in the Favorites sidebar will be gone so if you want it back, you will need to drag the new folder location and make a new Favorites shortcut.

从这里开始,所有将OS X的Documents文件夹用作默认保存位置的应用程序,都会将它们保存到用户文件夹根目录中的旧位置,而实际上是将它们保存到OneDrive。 另外,“收藏夹”侧边栏中的快捷方式将消失,因此,如果您希望返回快捷方式,则需要拖动新文件夹位置并创建新的“收藏夹”快捷方式。

os 移动文件夹_如何将OS X上的特殊文件夹移动到云存储

We want to note that, when you create these new sidebar favorites, you lose the special fancy icons that come with OS X by default. If the loss of the fancy icons are bothersome, then you can consider using something like cDock to enable colored Finder sidebar icons, and then replace everything with custom icons.

我们要注意的是,在创建这些新的侧边栏收藏夹时,默认情况下会丢失OS X随附的特殊花式图标。 如果丢失了精美的图标,那么您可以考虑使用cDock之类的工具来启用彩色的Finder侧边栏图标,然后将所有内容替换为自定义图标。

os 移动文件夹_如何将OS X上的特殊文件夹移动到云存储

Let’s try one more example. We’re pretty good about keeping all our photos on Dropbox, but OS X has it own Pictures folder. Let’s go through the steps we just performed and move the Pictures folder.

让我们再尝试一个示例。 我们非常乐意将所有照片保存在Dropbox上,但是OS X拥有自己的Pictures文件夹。 让我们完成刚刚执行的步骤,然后移动“图片”文件夹。

Our new Dropbox location is going to be “/Users/username/Dropbox/Photos/” (or whatever you want to call the final destination folder) and the commands we’ll use are:

我们新的Dropbox位置将是“ / Users / username / Dropbox / Photos /”(或您要调用的最终目标文件夹),我们将使用的命令是:

sudo mv ~/Pictures /Users/username/Photos

sudo mv〜/图片/用户/ 用户名 /照片

ln -s “/Users/username/Dropbox/Photos” ~/Pictures

ln -s “ /用户/ 用户名 / Dropbox /照片” 〜/图片

We hit “RETURN”, enter our password, and when we check our user folder, we see the Pictures folder is now an alias.

我们点击“返回”,输入我们的密码,当我们检查用户文件夹时,我们看到“图片”文件夹现在是别名。

os 移动文件夹_如何将OS X上的特殊文件夹移动到云存储

Double-click to open the folder, and it opens in our Photos folder in our Dropbox.

双击打开文件夹,它会在Dropbox的Photos文件夹中打开。

os 移动文件夹_如何将OS X上的特殊文件夹移动到云存储

You can go through and safely perform this procedure on any of your user media folders. It’s not necessary or advantageous to move the Public or Desktop folders but everything else is pretty fair game.

您可以在任何用户媒体文件夹上进行安全操作,并执行此过程。 移动“公共”或“桌面”文件夹不是必需的,也不是有利的,但是其他一切都是相当公平的游戏。

Now, you can back up your iTunes library, movies, pictures, and other valuable media files to the cloud without thinking about it, and the the only downside is you lose a fancy sidebar icon. It’s a small price to pay for such convenience and peace-of-mind!

现在,您无需考虑即可将iTunes资料库,电影,图片和其他有价值的媒体文件备份到云中,唯一的缺点是丢失了精美的侧边栏图标。 如此便捷和省心的价格不菲!

翻译自: https://www.howtogeek.com/204595/how-to-move-special-folders-on-os-x-to-cloud-storage/

os 移动文件夹