File me tickets or star the repo.
Clean up old files or folders
Denny:dennyzhang.com denny$ ./cleanup_old_files.py --help
usage: cleanup_old_files.py [-h] --working_dir WORKING_DIR [--examine_only] [--filename_pattern FILENAME_PATTERN]
[--cleanup_type CLEANUP_TYPE] [--min_copies MIN_COPIES] [--min_size_kb MIN_SIZE_KB]
optional arguments:
-h, --help show this help message and exit
--working_dir WORKING_DIR
Perform cleanup under which directory
--examine_only Only list delete candidates, instead perform the actual removal
--filename_pattern FILENAME_PATTERN
Filter files/directories by filename, before cleanup
--cleanup_type CLEANUP_TYPE
Whether to perform the cleanup for files or directories
--min_copies MIN_COPIES
minimal copies to keep, before removal.
--min_size_kb MIN_SIZE_KB
When remove files, skip files too small. It will be skipped when removing directories
- Code is licensed under MIT License.