| Crates.io | logrotate |
| lib.rs | logrotate |
| version | 1.0.0 |
| created_at | 2025-09-18 22:24:11.135655+00 |
| updated_at | 2025-09-18 22:24:11.135655+00 |
| description | Cli tool for rotating / archiving files within specified directory. |
| homepage | https://github.com/jackpots28/logrotate |
| repository | https://github.com/jackpots28/logrotate |
| max_upload_size | |
| id | 1845525 |
| size | 65,779 |
Taking inspiration from the Linux tool: https://linux.die.net/man/8/logrotate
Slim version of a logrotate cli utility for: archiving, removing, and truncating files in a provided directory.
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
| File Extension | Supported | Planned |
|---|---|---|
| log | ✅ | - |
| txt | ✅ | - |
| text | ✅ | - |
| bin | ❌ | ❌ |
| xml | ✅ | - |
| csv | ✅ | - |
| json | ✅ | - |
| elf | ❌ | ❌ |
| cef | ❌ | ✅ |
| clf | ❌ | ✅ |
| syslog | ❌ | ✅ |
| Any Unnamed Extension | ❌ | ❓ |
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
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