Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 23 lines (15 sloc) 351 Bytes
#!/bin/bash
DESTDIR="${HOME}/Videos/Flash"
if [ ! -d "$DESTDIR" ]
then
mkdir -p $DESTDIR || exit 1
fi
LINES=`lsof |grep '/tmp/Flash[^ ]*'`
IFS=$'\n'
for i in $LINES
do
FILE=`echo $i |awk '{print "/proc/" $2 "/fd/" $4}' |sed 's/[rwu]$//'`
NAME=`echo $i |awk '{print $9}' |awk -F '/' '{print $3}'`
cp $FILE ${DESTDIR}/${NAME}.flv
done
exit 0
Something went wrong with that request. Please try again.