After running the program, the specified directory should contain logs which cover:
- Last 7 most recent days that there are logs for
- Last 4 most recent Sundays that there are logs for
- Last 3 most recent first of month that there are logs for
- Any files that do not have a date time stamp
Last
is defined as, keep going until the quota is filled, or there are no
more files.
At most one log file per day.
- Establish start date (default is current date)
- Get the list of filenames
- Go through each constraint and mark those files
- Delete unmarked files
This is a command line based application.
$ purge_logs DIRECTORY
5 logs purged