https://github.com/jojomi/rot
"I will delete that file later, promised" – because humans are so bad at keeping promises!
https://github.com/jojomi/rot
automatic cleanup cli delayed delete maintenance remove server softdelete
Last synced: about 2 months ago
JSON representation
"I will delete that file later, promised" – because humans are so bad at keeping promises!
- Host: GitHub
- URL: https://github.com/jojomi/rot
- Owner: jojomi
- License: mit
- Created: 2017-04-08T08:39:53.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-11-08T22:01:00.000Z (over 1 year ago)
- Last Synced: 2024-11-08T23:17:20.583Z (over 1 year ago)
- Topics: automatic, cleanup, cli, delayed, delete, maintenance, remove, server, softdelete
- Language: Go
- Homepage:
- Size: 468 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rot
[](https://goreportcard.com/report/github.com/jojomi/rot)
You have that file on your hard disk (oh SSD these days, pardon me) that you might need in a couple hours or a few days. You know you probably won't need it again, but what if? What if you have to install your Linux server yet again tomorrow because you already screwed it up? Would you want to redownload that huge ISO file? Rather not, but you will forget about that file sitting in your downloads folder occupying all that precious expansive storage space. If you are lucky, you will find it hogging your resources unnecessarily when cleaning up in a year thinking why the hell you never got around to delete that hopelessly outdated and outrageously big file. You are human! And you are not alone. I feel with you. Let's have someone (something?) else take care.
`rot` is a tool that will take care of removing files and folders you know you will not need anymore after a certain time. You can specify either a number of hours or days or a rot date after which `rot` can safely remove it from your disk.
# Usage
```
rot empowers you to stage files and folders for rotting (later deletion).
Usage:
rot [command]
Available Commands:
add Add files or folders for rotting
clean Clean files and folders that are rotten
help Help about any command
list List the files and folders current rotting
stop Stops a file or folder from rotting
```
For all usage details call `rot --help` or add `--help` to any of the subcommands listed.
You could use `rot clean --dry-run` for monitoring if there are files that should be deleted. If you are brave enough to automate it more, run the command `rot clean` periodically. If you want to monitor for files or folders that were changed since being staged for deletion, use this: `rot list --changed`.
# Downloads
Currently this project is in **alpha** status. This means even though there is unit tests for the basic features it still needs to be tested with real life use cases. Ready-built binaries can be downloaded on the [releases page](https://github.com/jojomi/rot/releases).
You can build and run this code like any other [Go](https://golang.org) code:
go install github.com/jojomi/rot@latest
# Development
If you encounter problems please open an issue.
## Run Tests
go test github.com/jojomi/rot/cmd