From 21e8db012f8c46f75e43a40da3f3e2676363c291 Mon Sep 17 00:00:00 2001 From: johannst Date: Sat, 14 Mar 2020 18:01:23 +0000 Subject: deploy: 951ccb67565f34a0aa1b23ad6eef647aed5e0b4b --- lsof.html | 244 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 244 insertions(+) create mode 100644 lsof.html (limited to 'lsof.html') diff --git a/lsof.html b/lsof.html new file mode 100644 index 0000000..63d37e9 --- /dev/null +++ b/lsof.html @@ -0,0 +1,244 @@ + + + + + + lsof - Notes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

lsof(8)

+
lsof
+  -a ......... AND slection filters instead ORing (OR: default)
+  -p <pid> ... list open file descriptors for process
+  +fg ........ show file flags for file descripros
+  -n ......... don't convert network addr to hostnames
+  -P ......... don't convert network port to know service names
+  -i <@h[:p]>. show connections to h (hostname|ip addr) with optional port p
+
+
file flags:
+  R/W/RW ..... read/write/read-write
+  CR ......... create
+  AP ......... append
+  TR ......... truncate
+
+

Examples

+

Show open files with file flags:

+
lsof +fg -p <pid>
+
+

Show open tcp connections from user:

+
lsof -a -u $USER -i tcp
+
+

Show open connections to 'localhost' for user:

+
lsof -a -u $USER -i @localhost
+
+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3