TOTAL_DIRS=0
COMPRESSED_FILES=0
-MAX_AGE=210
+MAX_AGE=180
MIN_AGE_COMPRESS=3
+MIN_SIZE_COMPRESS=500
+MAX_NR_FILES_COMPRESS=10000
#------------------------------------------------------------------------------
my_date() {
echo
echo "[$( my_date )]: Compressing files older than ${MIN_AGE_COMPRESS} days:"
- for fname in $( find "${HOSTS_DIR}" -type f -size +50c -mtime +${MIN_AGE_COMPRESS} | \
- egrep -vi '\.(gz|bz2)$' | head -n 10000 ) ; do
+ for fname in $( find "${HOSTS_DIR}" -type f -size +${MIN_SIZE_COMPRESS}c -mtime +${MIN_AGE_COMPRESS} | \
+ egrep -vi '\.(gz|bz2)$' | head -n ${MAX_NR_FILES_COMPRESS} ) ; do
if [[ -f "${fname}" ]] ; then
echo " * '${fname}'"
ls -l "${fname}"