linux 弹出光驱失败

 

[root@NB media]# eject #弹出光驱的命令
umount: /media/____: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
eject: unmount of `/media/____' failed
[root@NB media]# fuser -m -v /media/____/
Cannot stat file /proc/20516/fd/5: No such file or directory
                     USER        PID ACCESS COMMAND
/media/____/:        root      20502 ..c.. su
                     root      20505 ..c.. bash
                     root      20516 ..c.. iotop
[root@NB media]# fuser -m -k /media/____/
Cannot stat file /proc/20516/fd/5: No such file or directory
/media/____/:        20502c 20505c 20516c
[root@NB media]# eject #弹出成功

fuser 可以显示出当前哪个程序在使用磁盘上的某个文件、挂载点、甚至网络端口,并给出程序进程的详细信息。

然后可以添加一个-k 参数把占用的进程给干掉!

posted @ 2017-01-08 15:08  bass  阅读(554)  评论(0编辑  收藏  举报