Close

Find and delete log files older than specific days on Linux or Unix

Find log files older than specific days:

find /app/logs/ -name "*.log" -type f -mtime +[number_of_days] -ls

Delete log files older than specific days:

find /app/logs/ -name "*.log" -type f -mtime +[number_of_days] -delete
scroll to top