Skip to main content

How to download Flash Files : No Flash files in /tmp ?

Firstly, we have our facebook page now, you will find a link to like this page in the right column, please like this page and keep yourself updated about new post(s) on Linux on Desktop.

First a disclaimer,it might be illegal to download flash file,it depends upon the website's TOS and I encourage you to go through them before attempting to download flash file, if it is illegal I will NOT recommend that you download flash file.

There are different ways to download flash file, there are plugins that you can install in firefox, there are scripts that allow you to do so, however,one of the better ways that I have used for years( at least more than a year) is copying FlashXXX files from /tmp and renaming them appropriately.

Whenever flash played any media file in the browser, it downloaded Flash file locally in /tmp and deleted it when you closed the page. This had many advantages, for instance if you find something interesting and have already watched it in browser, you do not have to download it again using some plugin, or for instance you could only play part of file by seeking it appropriately and the relevant section is only downloaded in /tmp.

However, I found after updating my system, I no longer had FlashXXX files stored in /tmp , I looked frantically on net to find out reasons for this and found that this has to do with Adobe Flash Player being updated, which no longer saves Files temporarily in /tmp. I further looked up different forums on the Internet and found Flash indeed saved file on the system locally, it was just bit more difficult to access them.

In this post I would try to demonstrate how to retrieve flash files stored locally in the system while it is being played in the web-browser when they are not saved in /tmp. This works with Mozilla Firefox, I haven't tried this with other browsers, though it can work.

One approach to solve this problem would be to downgrade your flash to earlier version, but this is not recommended as updates fix many critical security vulnerabilities and further have performance improvements.

The key to finding flash is the fact that on POSIX based systems, or for instance GNU/Linux all the information about processes running on the system is stored in "/proc" directory were each running process is identified with Process ID and there is a directory corresponding to PID in /proc. Further, all the open File descriptors are maintained here i.e in a lyaman all the information about files opened by process is here.

So if we can find process ID corresponding to the instance of flash player and find the fd corresponding to opened flash file we can easily copy the file and this is the approach that is followed by this script ( I am not the original author of this script) :

Open your favorite text editor and copy the following script, and rename it to something like -

#!/usr/bin/env bash

for flashpid in $(pgrep -f; do
cd "/proc/$flashpid/fd"
for video in $(file * | grep '/tmp/Flash' | sed 's/\(^[0-9]*\).*/\1/g'); do
echo "/proc/$flashpid/fd/$video"
Now, open your favorite flash(ensure it is legal to copy) file in web-browser, and in terminal window execute this file by issuing command :

This should print the fd corresponding to all the flash files currently playing, copy them using conventional UNIX command and rename it to meaningful name.

The screen shot below illustrates this -

We had opened a video in Firefox, then we executed script, which gave us file descriptors of opened flash video, we copied and renamed this to some meaningful file name and played it using mplayer.

Article Written by : Ambuj Varshney (
For Linux on Desktop Blog ,
(C) 2011 , Ambuj Varshney


  1. Thanks for the post. You saved me a lot of time researching the issue. Your method worked for me with Chromium 10.0.648.151 under Arch Linux, using the built-in Flash support.

    One usage note: use the "cp" command in a terminal rather than trying to copy the file with a file manager. Thunar, at least, can't follow the link to make a copy. However, invoking VLC against the link in Thunar worked fine.

    Here's what the link looks like --
    [rms@archbang scripts]$ bash
    [rms@archbang scripts]$ ls -l /proc/13078/fd/28
    lr-x------ 1 rms users 64 Mar 21 17:47 /proc/13078/fd/28 -> /tmp/FlashXXhqthjL (deleted)
    [fdz@archbang scripts]$

    [No, I,m not rms, but I don't think he would mind!]

  2. @dougz : I am glad you liked this post, I have used cp here in the screen shot. thanks for the tip :D

  3. Thanks for this - I will try it. Here's another way: When I couldn't find the flash files in /tmp anymore, I researched and found that the files can be found in your Firefox cache. This is a bit harder to find, and you have to enable "Show Hidden Files" in the "View" menu. I also had to enlarge the cache size - I changed it to about 1000 mb. Then, if you sort the files in the cache by size, the flash files are usually at the end, because they're the largest. Just copy them, or even cut and paste, to the folder you want to keep them in and rename them to something meaningful.

  4. kunlej3:35 AM

    Great! Debian Squeeze(beta) had the old way /tmp for flash files. However the new Crunchbang (based on debian squeeze stable) is already with new flash player.

    I'd just add to your .sh one line before the 'done':

    cp "/proc/$flashpid/fd/$video" /tmp

    in this way, with a 'single click', all flash instances at a time are copied to /tmp, which I find more flexible to manage afterwards. And you don't need terminal at all for that - just double click on .sh file from let's say desktop.

    Thanks a lot

  5. voltron2:11 PM

    thank you so much! Works perfect, but I sure miss the easy way of just copying straight from the tmp folder.


Post a Comment

Popular posts from this blog

Over 16 Small Games For Ubuntu Linux

Over 16 Small Games For Ubuntu Linux

Ubuntu Linux is one of the most popular Linux distribution , it is especially popular among Linux newbies and windows refuges . Now Ubuntu Linux does come with a descent set of applications , still there is a scope for including some more quality applications and especially games . Now in this tutorial i will show you how to install a large number of small , easy and less resource hungry games on Ubuntu Linux with screen-shots of games .

1. Rocks 'n' Diamonds

Rocks 'n' Diamonds is a Boulderd*sh game for X11 with more than just the falling rocks and diamonds of its namesake. The object is still to collect all the diamonds (and emeralds), then get to the exit before time runs out. But your character must make use of bombs, spaceships, and many other elements in order to fill his quota of jewels.

Installation : -

Type the following command in the terminal window


13 Things to do immediately after installing Ubuntu

In this article i describe some of the things to do immediately after installing ubuntu on your machine . Since most of the people reading this would be shifting from Windows to Linux with a system dual booting so i would focus more on making transition easy from Windows to Linux.

Creating Your ultimate Ubuntu 7.10 Desktop

Ubuntu 7.10 Codenamed Gusty Gibbon was released few weeks back with much fanfare ,now Ubuntu for past couple of years has been one of the most popular Desktop Linux distributions . Ubuntu 7.10 includes a number of features , applets and Wizards to simplify desktop Linux experience however because of many licensing restrictions it does not include out of the box support for popular audio/video codecs and many commercial but good applications . Also because of the limitation of trying to accommodate all kind of applications on single CD Ubuntu comes with a limited set of applications .

Now , i often have arguments with my friends who are new to computers that windows is…

Convert text files to MP3 under Linux

Even though I am not a fan of audio books and the only thing I use my iPod for is listening music still while exploring Festival(which is basically a General multi-lingual speech synthesis system) I found out that it's very easy to convert normal text files into mp3 using festival . Now this could be especially useful for people who either listen to audio books or people who have difficulty in reading.

First we would need to install festival. We can install festival with the following command :

sudo apt-get install festival

Now we need to install voices which would be used to dictate the text (install any one of the following ) :

To install British Accented male voice issue the following command :

sudo apt-get install festvox-rablpc16k

To install American Accented male voice issue the following command:

sudo apt-get install festival festvox-kallpc16k

Now once you have installed festival and voice package we are ready to convert text files .wav files .

Lets say you want computer to rea…