XY BLOG

XY的BLOG

脚本delfile

Published on in Posts
Updated on
Short link: https://b.xyzt07.cn/s/18
Share this post
A ⇄ 文
⚠️ This entry is already over one year old. It may no longer be up to date. Opinions may have changed.
#!/bin/sh
lastdate=`/opt/bin/date -d "20 days ago" +%Y-%m-%d`
echo $lastdate
candelfile=`rm -rf /tmp/mnt/media/video/${lastdate}*`
echo $candelfile

lastpicdate=`/opt/bin/date -d "20 days ago" +%Y_%m_%d`
echo $lastpicdate
candelpic=`rm -rf /tmp/mnt/media/pic/${lastpicdate}*`
echo $candelpic