qileilove

blog已经转移至github,大家请访问 http://qaseven.github.io/

Linux使用fuser命令找出访问文件系统的进程

 fuser用于标识访问文件或socket的进程信息。下面以经常会遇到的不能卸载光驱为例,讨论fuser的用法:
  1).卸载光驱文件系统:
  [root@vserver01 ~]# umount /mnt
  umount: /mnt: device is busy
  umount: /mnt: device is busy
  2).找出依然在访问该文件系统的进程号:
  [root@vserver01 ~]# fuser -c /mnt
  /mnt:                 2563c
  [root@vserver01 ~]# ps -ef | grep 2563
  root      2563  2499  0 15:19 tty1     00:00:00 -bash
  root      5462  5383  0 16:11 pts/0    00:00:00 grep 2563
  3).kill进程:
  [root@vserver01 ~]# kill -9 2563
  [root@vserver01 ~]# ps -ef | grep 2563
  root      5488  5383  0 16:11 pts/0    00:00:00 grep 2563
  4).成功卸载光驱文件系统:
  [root@vserver01 ~]# umount /mnt
  [root@vserver01 ~]#

posted on 2014-11-27 12:01 顺其自然EVO 阅读(584) 评论(0)  编辑  收藏 所属分类: 测试学习专栏


只有注册用户登录后才能发表评论。


网站导航:
 
<2014年11月>
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456

导航

统计

常用链接

留言簿(55)

随笔分类

随笔档案

文章分类

文章档案

搜索

最新评论

阅读排行榜

评论排行榜