美文网首页
Tip-Linux Command lsof

Tip-Linux Command lsof

作者: cctoken | 来源:发表于2019-05-26 18:04 被阅读0次

    OverView

    lsof
    list all open files

    • to list all open files

    lsof

    • to list opened files by process belong to specific user

    lsof -u [username]

    • list opened files based on their internet address

    lsof -i 4
    lsof -i 6

    • list opened files based on specific pid

    lsof -p [pid]
    lsof -p [^pid], use ^ means exclude the pid

    • list pids which process open the specific file

    lsof -t [filename with path]

    • limit lsof to a directory

    lsof +D [directory]

    • list all internet and x.25 network files

    lsof -i 没有参数

    • list all opened files based on port range

    lsof -i :1-1024

    • list all opened files based on type of connection (tcp/udp)

    lsof -i udp

    • list parent pid of the process

    lsof -p [pid] -R
    attention, use "-R"

    Lsof Reference

    相关文章

      网友评论

          本文标题:Tip-Linux Command lsof

          本文链接:https://www.haomeiwen.com/subject/ihsftctx.html