I am trying to tar files older than 3 days. I reviewed the existing question creating tar file and naming by current date but when I run the script the files do not get modified. Does anyone have some tips?
# Tar files older than 3 days
files=($(find /this/is/my_path/ -type f -mtime +3))
tar -cvfz backup.tar.gz "${files[@]}"
if [ ! -f ${LOGFILE}.tar.gz ]; then
Error checking
if [ $? -ne 0 ]; then
Process_Error $ERROR_SUM "This file had a problem $FILE!"
fi
fi
}