CharlieC3
3/8/2017 - 8:51 AM

Delete files older than certain number of days

Delete files older than certain number of days

#!/bin/bash
DAYS=30

find ./my_dir -mtime +${DAYS} -type f -delete