Skip to content

Instantly share code, notes, and snippets.

@m0n5t3r
Created August 10, 2015 14:37
Show Gist options
  • Save m0n5t3r/38adab4e2ae8d0a742d4 to your computer and use it in GitHub Desktop.
Save m0n5t3r/38adab4e2ae8d0a742d4 to your computer and use it in GitHub Desktop.
find file descriptors of cached Flash videos
#!/bin/bash
proc=$(ps ax | awk '/flashplayer/{ if($5 != "awk") { print $1; }}')
[ -z "$proc" ] && exit 0
for p in $proc; do
flash=$(ls -al /proc/$p/fd | grep FlashX)
if [ -n "$flash" ]; then
ls -al /proc/$p/fd | awk '/FlashX/{ print "/proc/' $p '/fd/" $9 }'
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment