Fast Delete is a Rust-based command-line tool designed to be a faster alternative to the traditional rm -rf
command. It leverages multithreading to efficiently delete files and directories.
- Multithreaded Deletion: Utilizes a thread pool to delete files concurrently, significantly speeding up the deletion process.
- Progress Tracking: Displays a progress bar to track the deletion process in real-time.
- Directory Cleanup: Removes empty directories after file deletion.
cargo install fast_delete
To build and install Fast Delete, ensure you have Rust and Cargo installed, then run:
cargo build --release
The compiled binary will be located in the target/release
directory.
frm <directory>
<directory>
: The path to the directory you want to delete.
frm ../demo
This command will delete all files in ../demo
.
Fast Delete has been benchmarked against the traditional rm -rf
command. The results show that frm
is slightly faster:
Command | Time (s) |
---|---|
rm -rf | 0m0.285s |
frm | 0m0.276s |
Additionally, here is a detailed summary of a deletion operation performed by frm
:
Deletion Summary:
Files processed: 1687/1687
Directories removed: 9
Time taken: 267.32ms
Average speed: 6310.73 files/second
These results demonstrate that frm
can handle large directories efficiently, making it a valuable tool for users who need to delete files and directories quickly.
To generate and open the documentation for Fast Delete, run the following command:
cargo doc --open --release
This will build the documentation and open it in your default web browser.
- walkdir: For directory traversal.
- rayon: For parallel processing.
- indicatif: For progress bar display.
- num_cpus: To determine the number of available CPU cores.
This project is licensed under the BSD 3-Clause License.
Contributions are welcome! Please open an issue or submit a pull request.
- Inspired by the need for a faster file deletion tool.