Mac 或 Linux 中的脱机文件

Mac 或 Linux 中的脱机文件

笔记:这是我之前问题的完整重写。它们相关但不重复。

我正在寻找 Mac (或 Linux) 等效版本Windows 脱机文件功能。我希望保留网络存储中文件的一些本地副本,因为我无法一直连接到 NAS。但是,我想确保文件在我再次连接到驱动器时​​立即同步(并且希望它们在此之后同步)。

请注意,该功能允许您从外部硬盘复制(缓存)几个文件夹,而不是整个硬盘。

有这样的事吗?

答案1

尝试齐奏

Unison 是一款适用于 Unix 和 Windows 的文件同步工具。它允许将
一组文件和目录的两个副本存储在
不同的主机上(或同一主机上的不同磁盘上),并分别进行修改,然后通过将 每个副本中的更改传播到另一个副本来
更新它们。

它允许您指定要同步的目录 - 这些将是您想要缓存的文件夹。您还可以精细地控制同步的方向。当您连接到驱动器时​​,它不会自动运行。您需要自己触发它,具体取决于您运行的 Linux 发行版以及您/它如何连接到远程驱动器。例如,如果您使用命令,将其包装在挂载后调用 unison 的脚本中。有一个简短的写上去有关如何使用它的说明,请参阅 Ubuntu 社区文档站点。

Unison 是一个命令行工具,也有一个同名的 GUI。如果您使用的是 Ubuntu,这两个软件包都包含在 Universe 中,但默认情况下不会安装。

$sudo apt-get 安装 unison unison-gtk

它也可通过端口(Fink、Macports 等)供 Mac 使用。

特征:

 * Unison runs on both Windows (95, 98, NT, 2k, and XP) and Unix
   (OSX, Solaris, Linux, etc.) systems. Moreover, Unison works across
   platforms, allowing you to synchronize a Windows laptop with a
   Unix server, for example.
 * Unlike a distributed filesystem, Unison is a user-level program:
   there is no need to modify the kernel or to have superuser
   privileges on either host.
 * Unlike simple mirroring or backup utilities, Unison can deal with
   updates to both replicas of a distributed directory structure.
   Updates that do not conflict are propagated automatically.
   Conflicting updates are detected and displayed.
 * Unison works between any pair of machines connected to the
   internet, communicating over either a direct socket link or
   tunneling over an encrypted ssh connection. It is careful with
   network bandwidth, and runs well over slow links such as PPP
   connections. Transfers of small updates to large files are
   optimized using a compression protocol similar to rsync.
 * Unison has a clear and precise specification, described below.
 * Unison is resilient to failure. It is careful to leave the
   replicas and its own private structures in a sensible state at all
   times, even in case of abnormal termination or communication
   failures.
 * Unison is free; full source code is available under the GNU Public
   License.

答案2

文件同步将在 Macintosh 上完成您想要的操作。

答案3

我使用 ifolder 取得了很大成功,它是双向文件共享的跨平台解决方案。它看起来很稳定。它是一种客户端-服务器解决方案。

另外,你可以看看http://offlinefs.sourceforge.net/wiki/,我还没有尝试过,但是看起来很有趣。

答案4

这不完全是你想要的,但根据你具体想要实现的目标,你可能需要考虑使用版本控制系统,例如颠覆。您的文件不会自动同步,但您会获得版本历史记录和一些其他实用功能。

相关内容