0

Is it possible in linux to determine how long a file has been open for? I have a process I suspect is performing long running operations on some files, but I'm unsure how to check.

0

Perhaps not the answer you are looking for, but ps has lstart as a standard format specifier.

lstart STARTED time the command started. See also bsdstart, start, start_time, and stime.

So in your case ps -eo pid,lstart,cmd could indicate how long a specific command is running.

-e            Select all processes.
-o format     User-defined format.

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.