logrotate

Crates.iologrotate
lib.rslogrotate
version1.0.0
created_at2025-09-18 22:24:11.135655+00
updated_at2025-09-18 22:24:11.135655+00
descriptionCli tool for rotating / archiving files within specified directory.
homepagehttps://github.com/jackpots28/logrotate
repositoryhttps://github.com/jackpots28/logrotate
max_upload_size
id1845525
size65,779
Jack Sims (jackpots28)

documentation

README

Logrotate - Unique Fork Written in Rust

Taking inspiration from the Linux tool: https://linux.die.net/man/8/logrotate


Rust

Intent:

Slim version of a logrotate cli utility for: archiving, removing, and truncating files in a provided directory.

Usage:

    logrotate --help
    Cli tool for rotating files within specified directory.
    
    Usage: logrotate [OPTIONS] --archive-method <ARCHIVE_METHOD> --directory <DIRECTORY> --keep-days <DAYS>
    
    Options:
          --dry-run
              Perform a dry run without making any changes Will output files marked for deletion, archival, and truncation
      -a, --archive-method <ARCHIVE_METHOD>
              Archival method to use [possible values: tar, tar-gunzip, zip]
      -d, --directory <DIRECTORY>
              Directory to parse through
      -k, --keep-days <DAYS>
              Number of days to keep archived files [default: 7]
      -h, --help
              Print help
      -V, --version
              Print version

Support:

File Extension Supported Planned
log -
txt -
text -
bin
xml -
csv -
json -
elf
cef
clf
syslog
Any Unnamed Extension

Build Locally:

Requires Rust (minimum stable-2024 & any-architecture)

  git clone https://github.com/jackpots28/logrotate.git
  cd logrotate
  cargo build --profile release
  sudo cp target/release/logrotate /usr/bin

Built binary is ~2Mb on disk

Install Prebuilt:

Brew (MacOS):

    TBD

Linux (Fedora / CentOS / RHEL / Rocky - dnf or yum | x86-64, aarch64, ppc64le):

    TDB

Linux (Debian - apt | x86-64, aarch64):

    TBD

Windows (x86-64 assumed):

    TBD

Crates.io

    TBD
Commit count: 24

cargo fmt