如何mount时dir会作为挂载点出现,umount之后dir随之消失
不知是否是自己记错了,以前看man mount 时好像有过类似表述
如何mount时dir会作为挂载点出现,umount之后dir随之消失
-
- 帖子: 2284
- 注册时间: 2013-05-26 6:58
- 系统: Debian 9
- qy117121
- 论坛版主
- 帖子: 50538
- 注册时间: 2007-12-14 13:40
- 系统: Winbuntu
- 来自: 志虚国乌由市
- 联系:
Re: 如何mount时dir会作为挂载点出现,umount之后dir随之消失
不能消失吧,如果你挂载到一个有文件的目录,umount后目录消失,那目录中的文件不就没了
渠月 · QY
本人只会灌水,不负责回答问题
无聊可以点一下→ http://u.nu/ubuntu
Ubuntu 20.04 快速设置指南,请配合浏浏览器自动翻译使用
邮箱 chuan@ubuntu.org.cn
本人只会灌水,不负责回答问题
无聊可以点一下→ http://u.nu/ubuntu
Ubuntu 20.04 快速设置指南,请配合浏浏览器自动翻译使用
邮箱 chuan@ubuntu.org.cn
-
- 帖子: 2284
- 注册时间: 2013-05-26 6:58
- 系统: Debian 9
Re: 如何mount时dir会作为挂载点出现,umount之后dir随之消失
应该有办法不出现这种情况qy117121 写了:不能消失吧,如果你挂载到一个有文件的目录,umount后目录消失,那目录中的文件不就没了
因为mount --bind也可以实现类似效果,原来的目录会在访问时被临时替换
但--bind和普通的挂载一样必须目标目录或文件存在
-
- 论坛版主
- 帖子: 18279
- 注册时间: 2009-08-04 16:33
Re: 如何mount时dir会作为挂载点出现,umount之后dir随之消失
如果掛載前需要創建新目錄 mkdire
那麼 養成習慣
卸載後 立刻刪除該目錄 rmdir
如何 ?
那麼 養成習慣
卸載後 立刻刪除該目錄 rmdir
如何 ?
-
- 帖子: 2284
- 注册时间: 2013-05-26 6:58
- 系统: Debian 9
Re: 如何mount时dir会作为挂载点出现,umount之后dir随之消失
最主要的是想知道是否能实现我1楼说的那种方式,还是真的是当时我熬夜记错了?poloshiao 写了:如果掛載前需要創建新目錄 mkdire
那麼 養成習慣
卸載後 立刻刪除該目錄 rmdir
如何 ?
-
- 论坛版主
- 帖子: 18279
- 注册时间: 2009-08-04 16:33
Re: 如何mount时dir会作为挂载点出现,umount之后dir随之消失
http://askubuntu.com/questions/279270/w ... as-been-mo
Why does umount automatically remove the mount point of a drive that has been mounted with a file manager?
It is not up to umount to delete a directory so from command line you need to do it yourself.
不干 umount 的事情
可以自己寫一個 script file (跟我上面的建議 類似)
Why does umount automatically remove the mount point of a drive that has been mounted with a file manager?
It is not up to umount to delete a directory so from command line you need to do it yourself.
不干 umount 的事情
可以自己寫一個 script file (跟我上面的建議 類似)
- cnkilior
- 论坛版主
- 帖子: 4984
- 注册时间: 2007-08-05 17:40
Re: 如何mount时dir会作为挂载点出现,umount之后dir随之消失
那不是Udisk就这么做的么?