<story><title>An lsof Primer</title><url>http://danielmiessler.com/study/lsof/</url></story><parent_chain></parent_chain><comment><author>naner</author><text>The thing I use lsof for most often these days is watching Flash videos with mplayer (or VLC if you prefer). This allows me to pause/rewind/fullscreen easier. Or sometimes I save the file to watch later. You still have to start the video from within Flash and then pause it so it downloads the video file. Then you can do this:&lt;p&gt;&lt;pre&gt;&lt;code&gt;    $ lsof | grep Flash
    plugin-co 1038   naner   16w   REG   254,2  4442164 7602188 /tmp/FlashXXfHeQqB (deleted)
    $ mplayer /proc/1038/fd/16
&lt;/code&gt;&lt;/pre&gt;
Oftentimes the output will give you duplicates for the same temporary flash file (FlashXXfHeQqB in this case) with an extra number after the process id, you can ignore all of that. I&apos;m assuming those are child processes. All you need is the process id (1038) and the file descriptor (16). You can safely ingore the character (w) after the file descriptor.&lt;p&gt;Back in the day (Flash 9 or so?) the flash player used to just dump temporary flash video files in /tmp and delete them after you close the browser tab. I guess they figured it was too easy to copy the files out of /tmp so the newer flash player deletes the /tmp file immediately after it creates them. This is why we have to go and grab the open file descriptor.&lt;p&gt;This will work with most but not &lt;i&gt;all&lt;/i&gt; websites. Some websites (Hulu) will use a streaming protocol (rtsp) among other things to make the content harder to get at outside of flash.&lt;p&gt;This works on Linux, I&apos;m not sure about OSX or BSD.</text></comment>
<story><title>An lsof Primer</title><url>http://danielmiessler.com/study/lsof/</url></story><parent_chain></parent_chain><comment><author>Udo</author><text>It&apos;s a good article. Beware though:&lt;p&gt;&lt;pre&gt;&lt;code&gt;  lsof +L1 shows you all open files that have a link count less than 1, 
  often indicative of a cracker trying to hide something
&lt;/code&gt;&lt;/pre&gt;
On OS X, lsof +L1 returns tons of files, this is normal.</text></comment>