[PLUG] Where a program stores temporary files

Richard England rlengland at frontier.com
Thu Aug 2 03:55:36 UTC 2012


On 08/01/2012 02:41 PM, Russell Senior wrote:
>>>>>> "wes" == wes  <plug at the-wes.com> writes:
>>> 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?
> wes> it is very possible it was all in memory. /tmp is a popular place
> wes> for programs to store temporary files (which are not always
> wes> deleted). if you're interested, you can also dig in by using
> wes> tools like strace and /proc.
>
> wes> use ps to find the pid of the transcription program. then, in a
> wes> terminal, do:
>
> wes> ls -la /proc/(pid goes here)/fd
>
> wes> that should give you a list of the files currently open by that
> wes> process.
>
> lsof is another option.  It should tell you what files each process
> has open.
>
>
Or isn't possible that it is still on the disk temporarily?  If a 
process still has the file open, even if you remove it doesn't it keep 
the data around until all the inode references are freed? That would 
mean that killing the last of the processes found using lsof, for 
instance, should finally remove the file. Or am I still living in the 
last century?

~~R



More information about the PLUG mailing list