https://github.com/thinkphp/view-disk
View disk space usage and delete unwanted data, fast.
https://github.com/thinkphp/view-disk
cargo delete-files delete-folder disk-usage rust
Last synced: 4 months ago
JSON representation
View disk space usage and delete unwanted data, fast.
- Host: GitHub
- URL: https://github.com/thinkphp/view-disk
- Owner: thinkphp
- License: mit
- Created: 2025-01-29T02:38:01.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-29T05:57:36.000Z (over 1 year ago)
- Last Synced: 2025-09-24T07:58:48.348Z (9 months ago)
- Topics: cargo, delete-files, delete-folder, disk-usage, rust
- Language: Rust
- Homepage: https://crates.io/crates/view-disk
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# View-Disk: Disk Space Usage & Cleanup Tool
A fast and efficient Rust-based CLI tool to **view disk space usage** and **delete unwanted files or directories**.
## 🚀 Features
- 📊 **View Disk Space Usage**: Displays total and available disk space.
- 🗑️ **Delete Files & Directories**: Remove unwanted data securely.
- ⚡ **Fast & Lightweight**: Built with Rust for high performance.
## 📦 Installation
### 1️⃣ **Clone the Repository**
```sh
git clone https://github.com/your-username/view-disk.git
cd view-disk
```
### 2️⃣ **Build the Project**
```sh
cargo build --release
```
### 3️⃣ **Run the Executable**
```sh
./target/release/view-disk --help
```
---
## 🛠️ Usage
### ✅ **View Disk Space Usage**
```sh
cargo run -- --view
```
or, if built:
```sh
./target/release/view-disk --view
```
### 🗑️ **Delete a File**
```sh
cargo run -- --delete /path/to/file
```
### 📂 **Delete a Directory**
```sh
cargo run -- --delete /path/to/directory
```
---
## 📝 Example Output
```
Disk Usage:
Name: "/dev/sda1", Total: 500000 MB, Available: 320000 MB
```
or when deleting:
```
File "/home/user/old.log" deleted successfully.
```
---
## 🔧 Development
### **Run in Debug Mode**
```sh
cargo run -- --view
```
### **Format Code**
```sh
cargo fmt
```
### **Run Clippy for Linting**
```sh
cargo clippy
```
---
## 📜 License
MIT License © 2025 Your Name
---
## 🤝 Contributing
Pull requests are welcome! Feel free to open an issue for feature requests or bug reports.