Usage:
prune-log-directory [OPTION]...
Description:
A tool used to selectively prune (delete) files within a directory. Files are sorted from oldest to newest based on last write time. Pruning order is based on filtering logic described in --file-filter
Example usage: sdgps prune-log-directory --directory=/path/to/my/directory --file-filter=".log"
Allowed options:
Option | Description |
---|---|
--help | produce help message |
--directory DIRECTORY | the directory to process |
--recursive | apply filter logic recursively through all subdirectories |
--dry-run | show output without deleting the files |
--minimum-age MINIMUM_AGE (=0) | minimum age of file in days in order to be allowed to be deleted |
--minimum-free-disk-space-proportion MINIMUM_FREE_DISK_SPACE_PROPORTION | minimum proportion of free space on disk, will keep deleting files until this amount of space is available |
--minimum-free-disk-space MINIMUM_FREE_DISK_SPACE | minimum amount of free space on disk, will keep deleting files until this amount of space is available (accepts, B, K, M, G, T as suffixes) |
--file-filter FILE_FILTER | regex pattern of files to prune |