zoukankan      html  css  js  c++  java
  • 如何kill一个端口下所有进程

    需要kill掉centos下80端口的所有进程,另做他用

    首先我们想到 ss或者netstat list all pid under port 80

    fuser is a simple yet powerful command line utility intended to locate processes based on the files, directories or socket a particular process is accessing. In short, it helps a system user identify processes using files or sockets.

    No process specification given
    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]]]


    fuser -v .

    fuser -v -n tcp 80

    fuser -k 80/tcp


    fuser -v -m example.txt 
  • 相关阅读:
    [SUCTF 2019]Pythonginx
    Buuctf-RSA1
    [网鼎杯 2020 朱雀组]phpweb
    [BJDCTF2020]ZJCTF,不过如此
    CTFHub-信息泄露
    vaex读取和处理大型文件的方法
    "生猪数据统计分析系统"----帮助文档
    法治理论1
    很短暂,很喜欢,很遗憾
    「CF1513E Cost Equilibrium」
  • 原文地址:https://www.cnblogs.com/toska/p/12606680.html
Copyright © 2011-2022 走看看