How to list open files in AIX Operating System

lsof is a useful command to list open files. When lsof is called without parameters, it will show all the files opened by any processes. Below are listed with some examples the use of lsof


To See which process use a library 
    • lsof /dir  
Show what files are opened by processes whose names starts by "s" (smb...).
  •   lsof -c s
  •   lsof -c smb
 Show what files are opened by processes whose names starts by "smb", but exclude those whose owner is the user "toto":
  • lsof -c courier -u ^toto
 Show the processes opened by user toto :
  • lsof -u toto
 Show what files are using the process (PID 86397):
  • lsof +p 86397
 Search for all opened instances of directory /tmp and all the files and directories it contains:
  • lsof +D /tmp
 List all opened internet sockets and sockets related to port 80:
  • lsof -i
  • lsof -i :80
 List all opened Internet and UNIX domain files:
  • lsof -i -U
 Show what process(es) has an connection opened to or from the host www.arcudi.org :
  • lsof -i@www.arcudi.org
 Useful link to lsof :

0 Comment to "How to list open files in AIX Operating System"

Post a Comment