0

Is there any Linux command that can list what files are being actively accessed (actively being read/written)?

E.g., while watching a video from web browser, I want to know where the cache file being written to. Or when my chromium-browser starts, I want to know what files it is reading. thx.

0

Check out the lsof command. This will list open files and what processes have them open.

Check here for usage.

| improve this answer | |
0

If you want to list files opened by specific process, just check /proc/$PID/fd directory.

If you want to trace file operations of specific process (and it's childs) you can use strace:

strace -efile -f -p$PID
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.