#!/bin/bash

CACHE_DIR=/mnt/sun-tcs01/core/shared/diagnostics_timeline/
CACHE_TIMEOUT=60

echo "Initial cache usage"
du -sh "$CACHE_DIR"

echo "Removing cache entries older than $CACHE_TIMEOUT days"
find "$CACHE_DIR" -type f -atime "+$CACHE_TIMEOUT" -delete

echo "Remaining cache usage"
du -sh "$CACHE_DIR"
