1

The issue is that, one particular flat file is getting created in a directory. I'm not sure which application is creating that flat file. I am using Unix environment.

Is there any possibility to identify which script/binary/application is creating that flat file.

SuRa
  • 111
  • 1

1 Answers1

2

as Gilles answer to this question: How to determine which process is creating a file?

lsof /path/to/file

after you locate the process you can determine the application using ps:

ps -ef | grep ProcessNumber

and to get only the Application use awk:

ps -ef | grep ProcessNumber | awk '{ print $8 }'
Nidal
  • 8,856
  • 11
  • 55
  • 74
  • `lsof` will not help here if the file has been created and closed by the time `lsof` is called. On the other hand, `LoggedFS` may be more helpful as it can display process info when file is created. – fduff Jul 23 '14 at 13:48