首页 > 系统服务 > 详细

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

时间:2014-11-11 02:32:47      阅读:310      评论:0      收藏:0      [点我收藏+]

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 ~]# 

有关fuser命令的详情参考文章:http://www.ha97.com/1030.html

--end--

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

原文:http://blog.itpub.net/23135684/viewspace-1325765/

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!