lsof [names...]
List open files
Arguments
Name | Description |
---|---|
names | Select named files or files on named file systems |
Options
Name | Description |
---|---|
-?, -h, --help | Help |
-a | Apply AND to the selections (defaults to OR) |
-b | Avoid kernel blocks |
-c <string or regexp (optional ending with /i /b /x)> | Select the listing of files for processes executing a command |
+c <number> | COMMAND width (9) |
+d <file> | Search for all open instances/files/directories of directory |
-d <File descriptor number> | Specify a list of file descriptors (FDs) to exclude from or include in the output listing |
+D <file> | Search tree for all open instances/files/directories of directory. *SLOW?* |
+f [flags] | Enable path name arguments to be interpreted |
-f <flags> | Inhibit path name arguments to be interpreted |
-F <options...> | Select fields to output |
-F? | Show fields for -F |
-g <PGID> | Exclude or select by process group IDs (PGID) |
-i <options> | Selects files by [46][protocol][@hostname|hostaddr][:service|port] |
-l | Inhibit conversion of user IDs to login names |
+L [number] | Enable listing of file link counts |
-L [number] | Disable listing of file link counts |
+M | Enable portMap registration |
-M | Disable portMap registration |
-n | No host names |
-N | Select NFS files |
-o | List file offset |
-O | No overhead *RISKY* |
-p <PIDs> | Exclude or select process identification numbers (PIDs) |
-P | No port names |
+r <time (seconds)> | Repeat every t seconds (15) until no files |
-r <time (seconds)> | Repeat every t seconds (15) forever |
-R | List parent PID |
-s [protocol:state] | List file size or exclude/select protocol |
-S [timeout (seconds)] | Stat timeout in seconds (lstat/readlink/stat) |
-T <info> | Disable TCP/TPI info |
-t | Specify terse listing |
-u <UIDs> | Exclude/select login|UID set |
-U | Select Unix socket |
-v | List version info |
-V | Verbose search |
+w | Enable warnings |
-w | Disable warnings |
-x <cross-over option> | Cross over +d|+D File systems or symbolic links |
-X | File descriptor table only |