From d86e7e35a2fd15014ae36f053ae880f1cc813f9f Mon Sep 17 00:00:00 2001 From: zlbabe <31076777+zlbabe@users.noreply.github.com> Date: Thu, 17 Aug 2017 14:08:23 +0200 Subject: [PATCH] lsof: list opened files in a directory (#1449) --- pages/common/lsof.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pages/common/lsof.md b/pages/common/lsof.md index e279d2b205..221bcbfa45 100644 --- a/pages/common/lsof.md +++ b/pages/common/lsof.md @@ -5,7 +5,7 @@ - Find the processes that have a given file open: -`lsof {{/path/to/file}}` +`lsof {{path/to/file}}` - Find the process that opened a local internet port: @@ -13,7 +13,7 @@ - Only output the process ID (PID): -`lsof -t {{/path/to/file}}` +`lsof -t {{path/to/file}}` - List files opened by the given user: @@ -26,3 +26,7 @@ - List files opened by a specific process, given its PID: `lsof -p {{PID}}` + +- List open files in a directory: + +`lsof +D {{path/to/directory}}`