blob: 3ee01e7eb9e829f52f51a36c13c8bed65fcf79ba (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# 🗑️ Trash
A **blazingly fast** and **safe** alternative to `rm`, written in Go! 🚀
## ✨ Features
- 🛡️ **Safer deletions**: No more accidental data loss! Files and directories
are moved to your system's trash instead of being permanently deleted.
- ⚡ **Blazingly fast**: Leverages the power of Go for
lightning-fast performance.
- 📜 **XDG Trash Specification**: Fully compatible with the XDG Trash spec for
cross-platform support.
- 💡 **Intuitive**: Seamlessly integrates into your workflow as a drop-in
replacement for `rm`.
---
## 🚀 Installation
```
go install github.com/rhogenson/trash@latest
```
---
## 🛠️ Usage
Replace `rm` with `trash` in your terminal commands for a safer experience:
```bash
trash somefile1.txt somefile2.txt somefile3.txt
trash somedirectory/
```
### Recovering Files
Files can be recovered from your system's trash in the
`~/.local/share/Trash/files/` directory:
```bash
ls ~/.local/share/Trash/files # List all trashed files
mv ~/.local/share/Trash/files/somefile1.txt.* ./somefile1.txt # Restore a trashed file
```
---
## 🌟 Why Use Trash CLI?
- 🧘 **Peace of mind**: No more oops moments when using `rm`.
- 🏃 **Fast and efficient**: Written in Go, optimized for performance.
- 🌎 **Portable**: Compatible with the XDG Trash spec.
---
## 💻 Compatibility
Trash CLI is compatible with:
- Linux 🐧
- macOS 🍎
- WSL 🌐
---
## 📄 License
This project is licensed under the GPLv3 License. See the [COPYING](COPYING) file for details.
|