To make the most efficient use of my hard disk space, I've started to run cron scripts that delete log files and other reports after a fixed time such as five days or two weeks.
Like most Linux command-line wizardry, this can be accomplished with a single shell command. Here's an example: find /report/*.twr -maxdepth 1 -mtime +14 -exec rm -f {} ;
The preceding command deletes all files that match the wildcard /report/*.twr that are 14 or more days old. It makes use of the find and rm programs.
Nut the above cmd does not find the files which starts with DOT . in the name
All comments are moderated before publication. These HTML tags are permitted: <p>, <b>, <i>, <a>, and <blockquote>. This site is protected by reCAPTCHA (for which the Google Privacy Policy and Terms of Service apply).