ffmpeg-mythtv/ffmpeg-clean-temp-files.sh

18 lines
321 B
Bash
Raw Normal View History

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