I built a small command-line tool inspired by Thanos’s snap. It selects randomly exactly half the files in a directory and (optionally) deletes them.
Repo: https://github.com/soldatov-ss/thanos
PyPI: https://pypi.org/project/thanos-cli/
It’s intentionally simple — feedback is welcome.
d3Xt3r•35m ago
What if there are an odd number of files, does it delete half a file then?
stranger-ss•24m ago
Example:
11 files -> deletes 5, keeps 6 (because 11 // 2 = 5)
1 file -> deletes 0, keeps 1