mount bind

104 字
1 分钟
mount bind

mount bind 功能详解

mount bind 可为当前挂载点绑定一个新的挂载点。 mount bind 绑定后的两个目录类似于硬链接,无论读写 bar 还是读写 foo,都会反应在另一方,内核在底层所操作的都是同一个物理位置。

Terminal window
mkdir foo bar
mount --bind foo bar

foot文件夹里的内容挂载到bar文件夹中。

Terminal window
umount bar

取消挂载。

文章分享

如果这篇文章对你有帮助,欢迎分享给更多人!

mount bind
https://kanochan.net/posts/3305/
作者
KanoChan
发布于
2023-03-27
许可协议
CC BY-NC-SA 4.0

评论区

文章目录