News for hackers. Stuff that matters.
Re:An lsof Primer by ars on Monday October 10, 2011 @04:46PM (#3095756)
Try this script:

  #!/bin/sh

  IFS='\
  '
  for i in `ls -dLtr \`lsof -c plugin-containe -a -u $USER -X +L1 | awk -F ' +' '/\/tmp\/Flash/{ print "/proc/" $2 "/fd/" gensub("[^0-9]", "", "g", $4); }'\``; do
    PLAY="$PLAY $i"
  done
  IFS=' '
  mplayer -osdlevel 3 -fs $PLAY
I have it bound to a shortcut key in my window manager and I installed http://userscripts.org/scripts/show/13333 to automatically pick 720p videos, and pause them.

So I go to youtube in a tab, let it buffer for a bit, hit the shortcut key and enjoy.

Note that it's only semi-recent versions of flash that automatically delete the videos, if not remove the +L1

Re:An lsof Primer by morsch on Monday October 10, 2011 @10:53PM (#3096866)
Just tried it. Consider my mind blown.

If you get an error relating to gensub ("function gensub never defined"), you need to install gawk.