Discrepancy with lsof command when trying to get the count of open files per process
I am trying to get a list of open files per process. I ran the following one-liner from PerlMonks:
I am trying to get a list of open files per process. I ran the following one-liner from PerlMonks:
This command is doing the rounds for detecting currently running processes using glibc:
When I try to remount a partition as read-only, I get an error /foo is busy. I can list all files open from /foo with
I know I can view the open files of a process using lsof at that moment in time on my Linux machine. However, a process can open, alter and close a file so quickly that I won’t be able to see it when monitoring it using standard shell scripting (e.g. watch) as explained in “monitor open process files on linux (real-time)”.
Hi I have many files that have been deleted but for some reason the disk space associated with the deleted files is unable to be utilized until I explicitly kill the process for the file taking the disk space