Is there a way to make lsof work continuously to monitor every file that is being opened in real time?
I don't know the name of the process. I want lsof to work continuously for a period of time until I see the the list contains what I want.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
I believe since you do not know the file name/process id, you could specify user name option as below.
lsof -r 2 -u username
If you know the directory name under which the application is being run and do not want to specify the user name,you could use the command like,
lsof +D /some/dir -r 2