ffmpeg-mythtv/ffmpeg-clean-temp-files.sh
Leo Butler 64766508f0 cron script to clean up files
clean files that have been transcoded
2020-07-27 17:33:47 -05:00

18 lines
321 B
Bash
Executable File

#!/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