Re: What command to see which file is opened by a program during execution?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



VJ wrote:

Hi,
  I forgot this command which could be used to see what files are
accessed by a program during it's execution time, the syntax was like
following

command_i_forgot program_i_want_to_monitor

and it used to print all files/shared libraries a program used to load
while program was running.

Can anybody tell what command is that?


well, to see what files are open, you could use lsof, but the argument would be the file you are interested in. Lsof by itself will show all open files, and you could grep it. If you know the process number of the program, lsof -p <process num> should give you the open files for that process.


Steve


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux