LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-04-2005, 11:11 AM   #1
Y0jiMb0
Member
 
Registered: Jul 2003
Location: Valencia (Spain)
Distribution: slackware 11, FEDORA CORE 4, RHEL3, Gentoo...
Posts: 361

Rep: Reputation: 30
Question 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
 
Old 08-04-2005, 11:20 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
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.
 
Old 08-04-2005, 11:35 AM   #3
Y0jiMb0
Member
 
Registered: Jul 2003
Location: Valencia (Spain)
Distribution: slackware 11, FEDORA CORE 4, RHEL3, Gentoo...
Posts: 361

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

Regards
 
Old 08-04-2005, 12:01 PM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
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.
 
Old 08-04-2005, 05:05 PM   #5
Y0jiMb0
Member
 
Registered: Jul 2003
Location: Valencia (Spain)
Distribution: slackware 11, FEDORA CORE 4, RHEL3, Gentoo...
Posts: 361

Original Poster
Rep: Reputation: 30
Quote:
Hope this clears things up a bit.
Definitely; thanks again.

Regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Program files firefly60 Linux - Newbie 6 07-27-2005 03:26 PM
CD-Rom reads/copies files slow. RoaCh Of DisCor Linux - Hardware 3 12-08-2004 11:49 AM
How program to read files with extension .dat y .cfg files COMTRADE in fedora 1? ivonne Linux - Software 0 11-22-2004 11:42 AM
Data DVD+RW only shows a few files (but reads OK on Windows) TerminalSpin Linux - General 0 08-09-2004 10:06 AM
editor that reads & writes msword doc files leobing Linux - General 3 04-08-2004 11:35 AM


All times are GMT -5. The time now is 04:52 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration