There are some times when I cache those videos but forget to view it. The whole cache is gone and the next time, the video needs to be buffered again. So, this simple bash script saves the flash videos each time they are updated.
#!/bin/sh
while true
do
if [ `inotifywait -e modify /tmp 2> /dev/null| wc -l` -gt "0" ]; then
cp -R /tmp/Flash* /home/anjan/temp
fi
done;
If you don’t have inotify-tools installed, install it using
sudo apt-get install inotify-tools
No comments:
Post a Comment