fuser命令使用心得

简介: fuser命令可用于查看正使用指定file, file system, socket port的进程信息。使用-k参数可将这些进程杀掉,-i则在杀掉进程前给出提示例子:[root@bogon ~]# fuser -k -i 80/tcp80/tcp: 30922 30...

fuser命令可用于查看正使用指定file, file system, socket port的进程信息。使用-k参数可将这些进程杀掉,-i则在杀掉进程前给出提示
例子:

[root@bogon ~]# fuser -k -i 80/tcp
80/tcp:              30922 30923
Kill process 30922 ? (y/N) y
Kill process 30923 ? (y/N) y

其他参数如下:

    -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
目录
相关文章
|
4月前
|
Linux
Linux常用命令以及命令解读
Linux常用命令以及命令解读
64 2
|
3月前
|
Linux 应用服务中间件 nginx
22. 【Linux教程】Linux 结束进程
22. 【Linux教程】Linux 结束进程
27 0
|
3月前
|
Linux 存储
24. 【Linux教程】挂载
24. 【Linux教程】挂载
31 0
|
4月前
|
Linux
认识Linux指令之 “more less” 命令
认识Linux指令之 “more less” 命令
认识Linux指令之 “more less” 命令
|
Linux Shell C++
Linux常用命令(1)Linux基本命令介绍
Linux常用命令(1)Linux基本命令介绍
130 0
|
Shell Linux C语言
Linux常用命令(5)——帮助命令
Linux常用命令(5)——帮助命令
|
Linux 开发工具
Linux常用命令(9)——网络命令
Linux常用命令(9)——网络命令
112 0
|
监控 NoSQL 算法
基本Linux命令和Linux工具
基本Linux命令和Linux工具
基本Linux命令和Linux工具
|
安全 Linux Shell
linux基本功系列之chattr命令
linux基本功系列之chattr命令
182 0
linux基本功系列之chattr命令
|
存储 Unix Linux
Linux常用磁盘管理命令详解
du命令用于查看文件和目录磁盘的使用空间。 命令语法:du [参数] [文件或目录名称] 参数说明:
134 0
Linux常用磁盘管理命令详解