如何查看当前通过 sshfs 挂载的所有文件夹?

如何查看当前通过 sshfs 挂载的所有文件夹?

我通过 sshfs 挂载了几个文件夹,但我找不到它们了。有人能指导我如何列出当前使用 sshfs 挂载的所有文件夹吗?

答案1

经过一些实验,我发现挂载的文件夹列表存储在

/etc/mtab

因此人们可以查看和卸载不需要的文件夹。

答案2

在我的 Arch 系统以及我可以访问的一个 Ubuntu (20.04.5) 上,有findmnt。从手册页:

       -t, --types list
              Limit the set of printed filesystems.  More than one type may be specified in a comma-separated  list.
              The  list  of filesystem types can be prefixed with no to specify the filesystem types on which no ac‐
              tion should be taken.  For more details see mount(8).

要仅打印sshfs安装,请使用findmnt -t fuse.sshfs

此工具通常分布在linux-utils

%zsh> apt-file search $(which findmnt)
util-linux: /bin/findmnt

相关内容