PDA

View Full Version : Finding what files a program has opened


sedarious
11-18-2002, 02:56 PM
Is there any way to find out what files a currently running application has open? The reason is excel always wants to open some tiff file as soon as it opens and this is causing all kinds of adverse effects...

Strike
11-18-2002, 03:51 PM
I know of a way to do it in Linux ..... :D

jamessan
11-18-2002, 03:55 PM
Yup. lsof is your friend in linux. Don't think there's an equivalent for Windows, unless it's been ported with cygwin.

stuka
11-18-2002, 06:08 PM
http://www.sysinternals.com
filemon
Description: This monitoring tool lets you see all file system activity in real-time. It works on all versions of WinNT/2K, Windows 9x/Me, Windows XP 64-bit Edition, and Linux.

-or-

handle
Description: This handy command-line utility will show you what files are open by which processes, and much more.

bwkaz
11-18-2002, 07:26 PM
fuser also works in Linux, and is fairly widespread (it's part of the psmisc package, which also contains killall and pstree). lsof is a separate package that not all distros install. ;)

But try what other things have been posted for Windows.

jamessan
11-19-2002, 12:01 PM
I didn't realize fuser could be used like that. I had just used it for fuser -k. Thanks for the info, bwkaz.

Stuka, good suggestion about sysinternals. I had forgot about them, but their junction utility has come in handy a few times.

bwkaz
11-19-2002, 01:27 PM
Heh. I didn't have a clue what fuser -k did. :P

I thought the only usage of it was like lsof... :redfaced: