A black hole made with 🦀 Rust, proceed with caution it makes disappear everything goes inside or you pass to it.
- Rust 1.65.0
- Cargo 1.65.0
This installation version is only for development purposes, be sure to have principal language and dev-tools installed: Rust and Cargo with the minimal version specified.
-
Clone the respository
git clone https://github.com/ruben69695/blackhole.git
-
Build the project usign cargo cli tool
cargo build
-
Run the project
cargo run -- --version
This installation version is for production use, be sure to have installed the dependencies for each platform to be able to install the CLI tool.
To be able to use the installation script ìnstall.sh
, is required to have installed the next dependencies:
- bash
- curl
- unzip
Execute the script ìnstall.sh
, root is not necessary
-
Give execute permission
chmod u+x install.sh
-
Execute the installer
./install.sh
If it's the first time installing the tool, re-open a new terminal to be able to use it
To be able to use the installation script ìnstall.ps1
, is required to have installed the next dependencies:
- powershell
Execute the script ìnstall.ps1
in Windows, admin is required to make the installation, if is not executed as admin it
will be elevated to do it automatically.
- Execute the installer
.\install.ps1
If it's the first time installing the tool, re-open a new terminal to be able to use it
-
Parameters
--help, -h print this message --version, -v print current version --eat, -e delete files or directories, if multiple items separate them by spaces <base_path> absolute path where to create the blackhole <interval> [optional] indicates the time in seconds it takes for the black hole to absorb data
-
Usage
blackhole --help blackhole --version blackhole <base_path> <interval> blackhole --eat <file_path_one> <file_path_two> <directory_path>
-
Examples
blackhole /home/user/Dowloads blackhole /home/user/Downloads 1.5 blackhole --eat /file.tkt /cat.c /home/ra/directory
-
Adding platform targets if not added: MacOS, Linux, Windows
rustup target add aarch64-apple-darwin rustup target add x86_64-apple-darwin rustup target add x86_64-unknown-linux-gnu rustup target add x86_64-pc-windows-gnu
-
Build release for every platform
-
Multiple way
cargo build --release --target=aarch64-apple-darwin --target=x86_64-apple-darwin --target=x86_64-unknown-linux-gnu --target=x86_64-pc-windows-gnu
-
Individual way
cargo build --target=aarch64-apple-darwin --release cargo build --target=x86_64-apple-darwin --release cargo build --target=x86_64-unknown-linux-gnu --release cargo build --target=x86_64-pc-windows-gnu --release
- Fedora 37 and MacOS Monterey
- Lapce 0.2.5
- Codium 1.74
- Linux
- MacOS (Apple Silicon and Intel)
- Windows