diff options
author | johannst <johannes.stoelp@gmail.com> | 2020-03-14 14:10:41 +0100 |
---|---|---|
committer | johannst <johannes.stoelp@gmail.com> | 2020-03-14 14:10:41 +0100 |
commit | 3099cd5efceebcbbc5ab1202c2b183ccd4453a65 (patch) | |
tree | 966e24e1226e8e3b2f279cd651c13b6776537a9a /src/lsof.md | |
parent | c5dfa4b329e9db6c68a6f5da77b7150f674206ef (diff) | |
download | notes-3099cd5efceebcbbc5ab1202c2b183ccd4453a65.tar.gz notes-3099cd5efceebcbbc5ab1202c2b183ccd4453a65.zip |
split debug.txt into mdbook chapters
Diffstat (limited to 'src/lsof.md')
-rw-r--r-- | src/lsof.md | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/lsof.md b/src/lsof.md new file mode 100644 index 0000000..a7ed2d1 --- /dev/null +++ b/src/lsof.md @@ -0,0 +1,36 @@ +# lsof(8) + +```markdown +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 +``` + +```markdown +file flags: + R/W/RW ..... read/write/read-write + CR ......... create + AP ......... append + TR ......... truncate +``` + +# Examples + +Show open files with file flags: +```markdown +lsof +fg -p <pid> +``` + +Show open tcp connections from user: +```markdown +lsof -a -u $USER -i tcp +``` + +Show open connections to 'localhost' for user: +```markdown +lsof -a -u $USER -i @localhost +``` |