https://github.com/hitzhangjie/rm
rm (rm-safe) is an alternative to shell /bin/rm, which supports `pin` or `unpin` operation to protect your data
https://github.com/hitzhangjie/rm
filesystem linux macos rm rm-safe unix utility
Last synced: 5 months ago
JSON representation
rm (rm-safe) is an alternative to shell /bin/rm, which supports `pin` or `unpin` operation to protect your data
- Host: GitHub
- URL: https://github.com/hitzhangjie/rm
- Owner: hitzhangjie
- Created: 2019-10-17T20:15:31.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-26T08:01:29.000Z (almost 6 years ago)
- Last Synced: 2024-06-20T13:34:30.423Z (about 2 years ago)
- Topics: filesystem, linux, macos, rm, rm-safe, unix, utility
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rm
rm (**rm-safe**) is an alternative to shell /bin/rm, which supports `pin` or `unpin` operation to protect your data.
# commands
- `rm help`, display help info
- `rm pin`, pin directories to protect them
`rm pin`: pin current directory
`rm pin [target]...`: pin targets, if target is file, pin directory of target
`rm pin -r [target]...`: pin targets recursively
- `rm unpin`, unpin directories to unprotect them
`rm unpin`: like `rm pin`
`rm unpin [target]...`: like `rm unpin [target]`
`rm unpin -r [target]...`: like `rm unpin -r [target]...`
- `rm [options] [target]...`, absolutely works like shell `/bin/rm`, why? I use exec.Command('/bin/rm', args) to fullfill the deletion task.
# installation
```bash
go install github.com/hitzhangjie/rm
```
`go install` will install `rm` to `$GOPATH/bin`, please make sure `$GOPATH/bin` appears before `/bin, /usr/bin` in `$PATH`.