Dec 10 2008

linux 下面看文件被哪个进程打开了

Category: 乱up当秘笈ssmax @ 13:06:56

Usage: fuser [ -a | -s | -c ] [ -n SPACE ] [ -SIGNAL ] [ -kimuv ] NAME…
             [ – ] [ -n SPACE ] [ -SIGNAL ] [ -kimuv ] NAME…
       fuser -l
       fuser -V
Show which processes use the named files, sockets, or filesystems.

    -a        display unused files too
    -c        mounted FS
    -f        silently ignored (for POSIX compatibility)
    -i        ask before killing (ignored without -k)
    -k        kill processes accessing the named file
    -l        list available signal names
    -m        show all processes using the named filesystems
    -n SPACE  search in this name space (file, udp, or tcp)
    -s        silent operation
    -SIGNAL   send this signal instead of SIGKILL
    -u        display user IDs
    -v        verbose output
    -V        display version information
    -4        search IPv4 sockets only
    -6        search IPv6 sockets only
    –         reset options

  udp/tcp names: [local_port][,[rmt_host][,[rmt_port]]]

如果windows下面有这样子的工具该多好啊。。。。找一下看看有没有先

One Response to “linux 下面看文件被哪个进程打开了”

  1. hotsnow says:

    以前不能umount U盘的时候好像用到过这个东东。很久不用都忘了,呵呵
    windows下好像有个东东叫wholockme,大概差不多这名字,呵呵

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.