Here is simple bash script to copy FLV Youtube into your folder in Ubuntu 12.04 Precise Pangolin. At this example, I put this script on home folder and create “Youtube” folder :
1 2 3 4 | cd ~/ mkdir Youtube vim u2tube.sh chmod a+x u2tube.sh |
u2tube.sh
1 2 3 4 5 6 | #! /bin/sh lsof -n -P | grep FlashXX | awk '{ print "/proc/" $2 "/fd/" substr($4, 1, length($4)-1) }' | while read f do echo $f cp $f /home/ubuntu/Youtube/`basename $f`-`date +%H:%s-%d-%m-%y` done |