[PLUG] Where a program stores temporary files

Dale Snell ddsnell at frontier.com
Wed Aug 1 21:29:54 UTC 2012


On Wed, 01 Aug 2012 14:07:32 -0700
"Richard C. Steffens" <rsteff at comcast.net> wrote:

> On 08/01/2012 12:57 PM, wes wrote:
> >> How do I go about locating that file? Was it even a file, or was it
> >> buffered in memory somewhere, and killing the instance removed it?
> > it is very possible it was all in memory. /tmp is a popular place
> > for programs to store temporary files (which are not always
> > deleted). if you're interested, you can also dig in by using tools
> > like strace and /proc.
> >
> > use ps to find the pid of the transcription program. then, in a
> > terminal, do:
> >
> > ls -la /proc/(pid goes here)/fd
> >
> > that should give you a list of the files currently open by that
> > process.
> 
> I see some interesting possibilities in /tmp. IIRC, transcribe uses 
> pulse audio. There are two directories in /tmp that start with
> pulse-. When I have some time I'll dig into them. One of them is
> locked. I also see some files whose names I recognize. It doesn't
> make sense for at least one of them to be there. It's locked. It's an
> rtf file that opens with Wine Wordpad. I know where the original copy
> of that file is. No idea why this one would be here and be locked.
> Maybe a Wine thing. But, other than the two pulse- directories,
> nothing obviously related to a sound file.
> 
> In /proc, I see mostly pipes and sockets. I also see
> inotify, /dev/nul, /home/rsteff.xsession-errors twice, and the file
> on which I am currently working.
> 
> Next time I have an issue with multiple files playing back at the
> same time, I'll try this again and see what's different.
> 
> Thanks.
> 


Dick,

You might try starting your transcription program with strace, to
see what files the program normally opens.  Something like this:

    $ strace -e trace=file transcribe [options]

strace will spew a lot of stuff to the terminal, and it can be a
pain to wade through.  But there are times when it's invaluable.
You'll probably want to consult the man page for strace(1) for all
the gory details.

Hope this helps.  If not, remember that it's worth every penny you
paid for it.  :-)  (Yes, I'm in a strange mood today.  Moo.)

--Dale

--
Pessimist:  The glass is half empty.
Optimist:   The glass is half full.
Engineer:   The glass is twice as big as it needs to be.



More information about the PLUG mailing list