cron script to clean up files

clean files that have been transcoded
This commit is contained in:
Leo Butler 2020-06-28 17:24:46 -05:00 committed by Leo Butler
parent 12d992fa94
commit 64766508f0

17
ffmpeg-clean-temp-files.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
set -x
set -e
if test -z "$TMP"; then
TMP="/mnt/lvraid5"
fi
workdir=${workdir:-"$TMP/ffmpeg-cut-list.d"}
cmd=${cmd:-"rm -f"}
minage=${minage:-7}
USER=${USER:-"mythtv"}
# delete old files
find "$workdir" -depth -daystart -type f -mtime '+'${minage} -user ${USER} -execdir ${cmd} '{}' '+'
# end of file