/prunefiles-python

Prune files like old logs

Primary LanguagePythonMIT LicenseMIT

prunefiles

A CLI tool to prune files like old logs.

Installation

pipx install git+https://github.com/Cologler/prunefiles-python

Usage

The example show how to prune log files with name PREFIX-0000.log.

prunefiles
    --match-format 'PREFIX-{seq:d}.log'
    --orderby seq
    --keep-count 5
    --keep-size 20MiB
    {DIRECTORY}