Tuesday, August 1, 2023

lsof "command options and usage" list of open files In Linux

 list of open files in current directory:-

$ lsof +D . 

list files open by a specific user:-

$ lsof -u username

list of all open files by specific process:-

$ lsof -p PID

kill all process belongs to as particular process:-

$ kill -9 `lsof -t -u username`

list of all tcp udp connection

$ lsof -i :port

$ lsof -i tcp ; lsof 0i udp;

list all network file system (NFS):-

$ lsof -N -u username -a 

No comments:

Post a Comment

Enable OpenSSH on Windows 11

Step 1: Install OpenSSH Server You can do this via PowerShell (run as Administrator ): Check if it's already available: Get-WindowsCapab...