mirror of
https://github.com/js0ny/oroot.git
synced 2026-08-05 21:32:44 +00:00
Command-line tool to manipluate impermanance old roots in btrfs
- Rust 87.3%
- Nix 12.7%
| src | ||
| .envrc | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
oroot
Browse and enumerate historical paths from old root snapshots.
This is intended to be used alongside setups like nix-community/impermanence with btrfs,
where previous roots are kept under /btr_pool/old_roots by default.
Usage
List the contents of the same path across old roots:
oroot ls /home/username/.config
Show only snapshots where that path is a non-empty directory:
oroot ls --non-empty /home/username/.config
Enumerate matching directories for integration with other programs:
oroot enum ~
This prints paths like:
/btr_pool/old_roots/2026-06-21_20-16-18/home/username
/btr_pool/old_roots/2026-06-22_09-25-08/home/username
~ is expanded to $HOME.
Example with sxyazi/yazi,
yazi $(oroot enum ~/Downloads | sort -r | head -9)
sort -r: sort in reverse order, showing newer roots first.head -n 9: keep the first 9 entries, sinceyazionly supports 9 tabs.
Separators
enum uses newline separation by default. Use --separator to choose another separator:
oroot enum --separator '\0' ~
oroot enum --separator ' ' ~
oroot enum --separator '\r\n' ~