removing older files with find

find . -mtime +7 -exec rm {} \;

This finds and deletes files with a modified time exceeding 7 days…

Every once in a while this becomes hugely necessary in pruning older logfiles, Since it has an “rm” command in it, I always look for the exact syntax and test.

–doug