删除过时的hls缓存
来源:互联网 发布:淘宝宝贝描述尺寸 编辑:程序博客网 时间:2024/06/03 21:10
#!/bin/bash
debug=0
for dir in `find /usr/local/nginx/html/ -type d`
do
test $debug -gt 1 && echo $dir
string=`echo $dir | awk -F "/" '{print $NF}'`
if [ "$string"x == "high"x ];then
test $debug -gt 0 && echo $string
continue
elif [ "$string"x == "low"x ];then
test $debug -gt 0 && echo $string
continue
elif [ "$string"x == "x" ];then
continue
else
for ts_list in `find $dir -name '*.ts' -type f`
do
ts_time=`stat -c %y $ts_list|awk -F "." '{print $1}'`
m3u8_time=`stat -c %y $dir"/test.m3u8"|awk -F "." '{print $1}'`
time_diff=$(($(date +%s -d "$m3u8_time") - $(date +%s -d "$ts_time")))
test $debug -gt 0 && echo $time_diff
if [ $time_diff -gt 180 ];then
test $debug -gt 0 && echo $dir
test $debug -gt 0 && echo $ts_list
rm -f $ts_list
fi
done
fi
done
阅读全文
0 0
- 删除过时的hls缓存
- shell 删除指定目录下过时的文件或目录
- 删除WKWebView的缓存
- smarty缓存的删除
- 删除WKWebView的缓存
- 缓存-生成缓存,读取缓存,删除缓存的类
- 怎么删除Xcode的缓存
- 删除WebLogic 10的缓存
- 删除weblogic应用缓存,weblogic 缓存的删除方法
- 永不过时的Lisp
- 过时的手机创意
- 已过时的方法
- 一些过时的感悟
- 那些过时的东西
- Hibernate4的buildSessionFactory过时
- 十大已过时的技能
- MVC的过时
- 过时的优化技巧
- android 常用权限和依赖
- HDU 5172 GTY's gay friends 线段树(排列,区间不同的数)
- IOS监听通话状态(私有API)
- Hive Multi Insert 引起的GC overhead limit exceeded
- unity3d代码设置环境光
- 删除过时的hls缓存
- 线程常用的两种创建方法
- Windows10 下 Eclipse+MonkeyRunner开发环境搭建
- SpringBoot(4) 统一异常处理
- c语言复习(三)
- C#中 openfiledialog 和 FolderBrowserDialog 的使用 2
- 通过web_custom_request编写接口压测脚本
- Spark RDD 分区数详解
- [ReactNative]Image点击事件[this.props.pop()]无法返回上一页