Created
August 10, 2015 14:37
-
-
Save m0n5t3r/38adab4e2ae8d0a742d4 to your computer and use it in GitHub Desktop.
find file descriptors of cached Flash videos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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