您的位置:首页 > 运维架构 > Linux

linux下保存firefox的缓存flash

2013-03-07 18:17 148 查看
和保存图片一样,简单起见只有一个文件:webfilm.bash

#!/bin/bash

#copyright by lingbofeiyun

#This shell script is to search for firefox Cache and save film to~/Videos

cd /home/yxy/.mozilla/firefox/700doz1r.default/Cache

loops() {

for film in *

do

if [ -d $film ]

then

cd $film

loops

cd ..

elif [ -f $film ]

then

message=$(file $film|grep "Flash Video")

if [ -n "$message" ]

then

cp $film /home/yxy/Videos/Webcam

message=""

fi

fi

done

}

loops

exit 0

还有一个script用来清空firefox的Cache文件夹下面的内容,so easy

webclear.bash

#!/bin/bash

#copyright by lingbofeiyun

#This shell script is to clear firefox Cache

cd /home/yxy/.mozilla/firefox/700doz1r.default/Cache

rm -fr *

exit 0
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  shell