shrd is a modern, fast, and secure file shredding utility written in Rust. It is designed to be a performant and reliable alternative to traditional tools like GNU shred.
- Leverages multi-threading to shred multiple files concurrently, making it ideal for large directories.
- Multiple overwrite passes (default 3, configurable).
- Varied patterns including random data, fixed patterns (
0xFF,0xAA), and a final zero-out pass. - Resetting file timestamps to the Unix epoch before deletion.
- Multiple randomized renames to obscure original filename and length.
- Synchronizes data to disk and flushes directory metadata to ensure complete removal.
- Automatically handles read-only files if the user has permission to modify them.
To build from source, you need the Rust toolchain installed.
cargo build --releaseThe binary will be available in target/release/shrd.
shrd [OPTIONS] <TARGET>Shred a single file:
shrd secret.txtShred a directory recursively with 5 passes:
shrd -r -p 5 ./private_folderShred without confirmation:
shrd -y obsolete_data.db-p, --passes <PASSES>: Number of overwrite passes (default: 3).-r, --recursive: Perform a recursive shredding of directories.-y, --force: Skip confirmation prompt.-j, --jobs <JOBS>: Number of parallel jobs (default is number of CPUs).-h, --help: Print help.-V, --version: Print version.
shrd is a powerful tool, but like all shredding utilities, it may be ineffective on:
- SSDs and NVMe drives due to wear leveling and flash management.
- Copy-on-Write (COW) filesystems like Btrfs or ZFS.
- Journaled filesystems when only metadata is journaled.
In these cases, the data may remain on the physical media even after the file is "shredded."
MIT