linux - 鸟哥解释fuser -m这个参数的说法我不懂
黄舟
黄舟 2017-04-17 13:03:08

fuser的-m参数用于显示某个目录下文件(而非此目录)的进程关联情况,以下是鸟哥给的例子,这个我懂的:

范例二:找到所有使用到 /proc 这个文件系统的程序吧!
[root@www ~]# fuser -uv /proc
# 不会显示任何数据,因为没有任何程序会去使用 /proc 这个目录啊!
# 会被用到的是 /proc 底下的文件啦!所以你应该要这样做:

[root@www ~]# fuser -mvu /proc
                     USER        PID ACCESS COMMAND
/proc:               root       4289 f.... (root)klogd
                     root       4555 f.... (root)acpid
                     haldaemon  4758 f.... (haldaemon)hald
                     root       4977 F.... (root)Xorg
# 有这几支程序在进行 /proc 文件系统的存取喔!这样清楚了吗?

不懂的地方在于:

鸟哥在例子之前的说法:

-m :后面接的那个文件名会主动上提到该文件系统的最顶层,对umount不成功很有效! //这句话我不懂,感觉和上下文完全没关系

fuser的manpage:

-m
name specifies a file on a mounted file system or a block device that is mounted. All processes accessing files on that file system are listed. If a directory file is specified, it is automatically changed to name/. to use any file system that might be mounted on that directory.

相比manpage我完全不懂鸟哥说的是什么意思~

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
Popular topics
More>
Latest downloads
More>
web effects
Website source code
Website materials
Front end template
About us Disclaimer Sitemap
PHP Chinese website:Public welfare online PHP training,Help PHP learners grow quickly!