LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   what files a program reads (https://www.linuxquestions.org/questions/linux-software-2/what-files-a-program-reads-349942/)

Y0jiMb0 08-04-2005 11:11 AM

what files a program reads
 
Hi!
I'd like to know what files a program is using (reading) when is runnig.
Anyone knows a linux software for that task?
Thanks,

Regards

druuna 08-04-2005 11:20 AM

Hi,

Only way I know how to do that (the running program is a binary, right?):

Use strace / truss. You probably end up with more info than you need, but that you can filter.

See manpage for details on how to use.

Just popped into my mind: lsof must be able to do this too.

Hope this helps.

Y0jiMb0 08-04-2005 11:35 AM

Ok, thanks!
Both lsof and strace look promising.
However what is this truss? I don't have it in none of my systems...

Regards

druuna 08-04-2005 12:01 PM

Hi,

truss is the unix version of strace (well, close enough).

Could even be that there is a linux version, I've never seen one, but I never actually looked for it. strace/lsof do what I want on a linux box.

Hope this clears things up a bit.

Y0jiMb0 08-04-2005 05:05 PM

Quote:

Hope this clears things up a bit.
Definitely; thanks again.

Regards


All times are GMT -5. The time now is 06:47 AM.