working on cleanup.sh

This commit is contained in:
Patrick McGuire
2021-10-13 17:18:14 -04:00
parent d2bb7163fa
commit 08074436d6
3 changed files with 8 additions and 23 deletions
+5 -2
View File
@@ -2,5 +2,8 @@
source /etc/birdnet/birdnet.conf
cd "${PROCESSED}" || exit 1
FIND_DATE=*$(date --date="2 days ago" "+%F")*
find . -name "${FIND_DATE}" -exec rm -rfv {} +
empties=($(find ${PROCESSED} -size 57c))
for i in "${empties[@]}";do
rm -f "${i}"
rm -f "${i/.csv/}"
done