Oxfs 是一个类似于 SSHFS 的用户空间网络文件系统,底层数据传输基于 SFTP 协议。 Oxfs 引入异步刷新策略,解决网络速度与用户操作文件速度不匹配导致的卡顿问题。 Oxfs在写入文件时,首先写入本地缓存文件,并提交异步更新任务将内容更新到远程主机。 同样,在读取文件时,优先从本地缓存文件中读取。 Oxfs 的数据缓存最终会落到磁盘上,即使重新挂载,历史缓存仍然可以使用。

安装

$ sudo apt-get install fuse
$ sudo apt-get install python3.7
$ python3.7 -m pip install oxfs

使用

# mount
$ oxfs --host mark@x.x.x.x --remote-path /home/mark --mount-point mark --cache-path ~/.oxfs --logging /tmp/oxfs.log --daemon --auto-cache

# browse & edit
$ cd mark

# umount
$ umount mark