[root@ecs-centos-7 ~]# lsof -u tt | grep deletedvim 27813 tt 4u REG 253,1 12288 131167 /home/tt/.p.txt.swp(deleted) 1. 2. 上面例子中使用 lsof -u tt | grep deleted 命令查看用户 tt打开着的确被删除的文件 从结果可以看出,在往 p.txt写入内容的时候,文件被删除了 列出所有打开了的网络...
[root@ecs-centos-7 ~]# lsof -u tt | grep deletedvim 27813 tt 4u REG 253,1 12288 131167 /home/tt/.p.txt.swp(deleted) 上面例子中使用lsof -u tt | grep deleted命令查看用户tt打开着的确被删除的文件 从结果可以看出,在往p.txt写入内容的时候,文件被删除了 列出所有打开了的网络文件 [root@ecs...
利用-l选项,可以过滤特定用户已打开的文件,如'lsof -u tt'列出tt用户打开的文件,而'lsof -u ^tt'则排除tt用户。当发现日志文件被误删除但仍在被打开时,'lsof -u tt | grep deleted'能找出此类文件。同时,lsof还支持根据IP版本(IPv4或IPv6)和协议(如TCP、UDP)筛选网络文件。通过-p选项...
container 859 root 8u unix 0xffff96061c390c00 0t0 553 /run/containerd/containerd.sock.ttrpc type=STREAM container 859 root 9u unix 0xffff96061c390800 0t0 554 /run/containerd/containerd.sock type=STREAM container 859 root 10u IPv4 20344 0t0 TCP localhost:45543 (LISTEN) root@containerd:~# ...
[root@localhost test]# lsof -n |grepdeleted mysqld2228mysql5uREG8,20272888/tmp/ib8JntcF (deleted) mysqld2228mysql6uREG8,20274923/tmp/ibz8C353 (deleted) mysqld2228mysql7uREG8,20274924/tmp/ibtmfGZs (deleted) mysqld2228mysql8uREG8,20274925/tmp/ibU2V6xl (deleted) ...
root@containerd:~# lsof -u _chrony COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME chronyd 89320 _chrony cwd DIR 253,0 300 128 / chronyd 89320 _chrony rtd DIR 253,0 300 128 / chronyd 89320 _chrony txt REG 253,0 285712 292271 /usr/sbin/chronyd (deleted) ...
root@containerd:~# lsof -u _chrony COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME chronyd 89320 _chrony cwd DIR 253,0 300 128 / chronyd 89320 _chrony rtd DIR 253,0 300 128 / chronyd 89320 _chrony txt REG 253,0 285712 292271 /usr/sbin/chronyd (deleted) chronyd 89320 _chrony...
root@containerd:~# lsof -u _chrony COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME chronyd 89320 _chrony cwd DIR 253,0 300 128 / chronyd 89320 _chrony rtd DIR 253,0 300 128 / chronyd 89320 _chrony txt REG 253,0 285712 292271 /usr/sbin/chronyd (deleted) ...
(ENV) [root@ceph-2 log]# lsof -w | grep deleted rsyslogd 619 root 9w REG 8,1 1942 33576309 /var/log/maillog (deleted) in:imjour 619 639 root 9w REG 8,1 1942 33576309 /var/log/maillog (deleted) rs:main 619 640 root 9w REG 8,1 1942 33576309 /var/log/maillog (deleted) ...
命令:lsof -u <username> 举例如下: 代码语言:bash 复制 root@containerd:~# lsof -u _chronyCOMMAND PIDUSERFD TYPE DEVICE SIZE/OFF NODE NAME chronyd89320_chrony cwd DIR253,0300128/ chronyd89320_chrony rtd DIR253,0300128/ chronyd89320_chrony txt REG253,0285712292271/usr/sbin/chronyd(deleted)chron...