LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   ez way to find the process that creates a file? (http://www.linuxquestions.org/questions/linux-general-1/ez-way-to-find-the-process-that-creates-a-file-28343/)

Griffon26 08-20-2002 09:09 AM

ez way to find the process that creates a file?
 
From time to time I find a file devnull in my home directory which probably indicates I made some typo's in a script I made.

From the timestamp on this file it does not seem to be anything run by cron and it is an empty file.

Is there some easy way to find out what process/which script is creating it?

Maybe I need to run something in the background for a while that keeps checking for the existence of this file and then make a sound when it appears, but I was hoping for a better solution =]

pk21 08-20-2002 09:22 AM

grep devnull /directory/where/i/can/find/your/scripts

Malicious 08-20-2002 03:36 PM

Quick and dirty?

Next time you see it, make it owned by root and read only. Will cause an error when the guilty prog/script tries to create it again.


All times are GMT -5. The time now is 09:22 AM.