Hi Petrus, On 20 October 2010 15:39, Petrus de Calguarium <pgueckel@xxxxxxxxx> wrote: > Suvayu Ali wrote: > >>> dupe_flash () >>> { >>> pid=$( ps -fu `whoami`| egrep 'libflashplayer\.so'| egrep -om 1 -E >>> '\<[0-9]+\>'| head -1 ); fid=$( lsof -p $pid | egrep '/tmp/Flash'| >>> egrep -om 1 -E '\<[0-9]+[a-z]\>'| tr -d 'a-z'); cp >>> /proc/${pid}/fd/${fid} ~/flashtmpfile >>> } > > Like I said, I really cannot figure out exactly what this does and I have not > yet tried the function. > > Perhaps my questions will be answered when I test it, but I will ask anyway: > > > Does this function wait until the .flv is fully downloaded? > No it doesn't. You have to call it after you are sure that the full video has been downloaded. You can do this by looking at the cache progress bar on the flash player. > Are you sure it will capture the numbered file from within > ~/.mozilla/firefox/blahblah.default/Cache? > > ...because I see the function accesses /tmp/Flash, which does not exist, ie., > there is no such directory. Recall/be reminded that the current Adobe Flash > 10 no longer creates files with the name /tmp/FlashXXXX. > The reason you don't see the /tmp/FlashXXXX file is because it is a deleted file, but it is still there. You can try running the commands in the function in a shell and look at the output to convince yourself. Something like this should work, $ ps -fu `whoami`| egrep 'libflashplayer\.so' $ # this will tell you the pid of the process running the plugin $ lsof -p <pid_from_above> | egrep '/tmp/Flash' $ # this will give you the file descriptor for the file in the /proc filesystem You will see the last command shows that the file is already deleted. The final copy command just uses the above two pieces of information (pid and file descriptor) to copy the file to your home. If you call this function before the video is downloaded completely, it will copy what ever has been downloaded so far. As I said in my earlier message, this is very limited and elementary function but it does the job. Feel free to modify to your needs. > So, ok, here goes, I will try it and I will report back... > Happy viewing / downloading. :) -- Suvayu Open source is the future. It sets us free. -- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines