How Do You Check Which Process Is Writing to a File in Linux?
Contents How Can I Tell What Process Created a File? Detecting Which Process Is Creating a File Using Ld_Preload Trick Using Auditd. Auditd Is a Subsystem for...
Contents
How can I tell what process created a file?
Detecting which process is creating a file using LD_PRELOAD trick
- Using auditd. auditd is a subsystem for monitoring and accounting for Linux. …
- Using strace, dtrace or a similar tool for tracking syscalls. Another approach is using a tool like strace or dtrace which allows you to monitor all the system calls used by a running process. …
- Using inotify. …
- Using fuser.
8 янв. 2014 г.
How do you find which process is creating a file in Unix?
5 Answers. The lsof command (already mentioned in several answers) will tell you what process has a file open at the time you run it. lsof is available for just about every unix variant.