From 63dd6bf41cf4702c6fb4acaa67307b54efd004b4 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 9 Jun 2022 07:46:04 +0200 Subject: [PATCH] fix find syntax --- evocheck.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/evocheck.sh b/evocheck.sh index 87d9e3e..9391f11 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -742,9 +742,7 @@ check_backupuptodate() { backup_dir="/home/backup" if [ -d "${backup_dir}" ]; then if [ -n "$(ls -A ${backup_dir})" ]; then - # Look for all files, including subdirectories. - # If this turns out to be problematic, we can go back to first level only, with --max-depth=1 - find "${backup_dir}" -type f --max-depth=1 | while read -r file; do + find "${backup_dir}" -type f -maxdepth 1 | while read -r file; do limit=$(date +"%s" -d "now - 2 day") updated_at=$(stat -c "%Y" "$file")