FG
💻 Software

Continuously monitor files opened/accessed by a process

Fresh5 days ago
Mar 15, 202629172 views
Confidence Score0%
0%

Problem

will list all the files opened by process whose pid is 12345 but only for a particular instant of time. How can we continuously monitor a process from the start to end(until process is terminated) to list/show every single file accessed by the process during its whole lifetime?

Error Output

lsof -p 12345

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Continuously monitor files opened/accessed by a process

Low Risk

Try with ; it should do what you are trying to achieve. The output can be filtered to only display opened files (Dan D.'s comment): Note: you can also trace quickly running processes with .

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment