Linux – Delete logs older than 30 days

# list files keep_days=30 pattern1=’*.log.*’ pattern2=’*.gz’ file_path=’/var/log/’ function bytes_for_humans { local -i bytes=$1; if [[ $bytes -lt 1024 ]]; then echo “${bytes}B” elif [[ $bytes -lt 1048576...