Go to file
Cyryl Płotnicki e8cf1a78f6
build / build-nix (push) Successful in 6m48s Details
build / check-nix (push) Successful in 3m51s Details
build / release (push) Failing after 12m16s Details
Test release action
2023-12-09 11:03:24 +00:00
.gitea/workflows Test release action 2023-12-09 11:03:24 +00:00
src hook up husky 2023-12-09 10:09:47 +00:00
.build.yml Add ssh secret 2022-04-23 14:28:22 +01:00
.envrc Add empty rust env 2022-04-23 10:11:27 +01:00
.gitignore check both develop and build targets 2023-08-27 07:31:43 +01:00
Cargo.lock hook up husky 2023-12-09 10:09:47 +00:00
Cargo.toml hook up husky 2023-12-09 10:09:47 +00:00
LICENSE Add license file, more crates.io categories 2022-06-25 08:03:17 +01:00
README.md update contact information 2023-08-27 08:33:14 +01:00
flake.lock update dependencies 2023-12-09 09:58:33 +00:00
flake.nix don't use linux-specific tools on darwin 2023-08-27 08:37:44 +01:00
shell.nix Add empty rust env 2022-04-23 10:11:27 +01:00


legdur - keep your legacy durable

legdur is a simple CLI program to compute hashes of large sets of files in large directory structures and compare them with a previous snapshot. Think having your photo collection you acquired over time and worrying about bitrot.


cargo install legdur --force should get you there on a system that has Rust installed already.

Try it out without installation

If you have a nix-flakes enabled system: nix run git+https://git.cyplo.dev/cyplo/legdur.git


legdur path/to/a/directory/


legdur ~/documents
2022-06-25T06:45:51.000214Z  INFO legdur: scanning '/home/cyryl/documents'
2022-06-25T06:45:51.044471Z  INFO legdur: list of files acquired, calculating hashes...
█████████████████████████████████████████████████████████████░░░░░░░░░░░░░░░░ 2788/3190


2022-06-25T06:49:23.776229Z  INFO legdur: hash calculation complete
2022-06-25T06:49:23.784499Z  INFO legdur: /home/cyryl/documents/legdur.db saved
2022-06-25T06:49:23.792585Z  INFO legdur: comparing /home/cyryl/documents/legdur.db with /home/cyryl/documents/legdur.old
2022-06-25T06:49:23.826548Z  WARN legdur: /home/cyryl/documents/legdur.db: 395f65f5727f946c0208f79cfe1f3de1bd81e491bb7631ba6f41fc578d3db368 -> 7d1b9748ed291eb6874c91917b5619eb8e1410e7cbfd37a517c5bd4ddf8c7895
2022-06-25T06:49:23.826715Z  WARN legdur: /home/cyryl/documents/legdur.old: e56cf4f6b7fdc2daa3ca3430e8e64bf9d042f1c0e465dcd452986709cb25f7d8 -> 395f65f5727f946c0208f79cfe1f3de1bd81e491bb7631ba6f41fc578d3db368

How it works

  • it will compute a hash of each file present in the directory structure (it works recursively).
  • if previously computed legdur.db exists it will compare the current state of the world to the one represented by legdur.db and output any differences. Only files that changed or got deleted get printed out, additions or file moves anywhere within the directory are not.
  • it will move the current legdur.db to legdur.old and write the new state of the world to a new legdur.db

Contact & contributions

  • Let me know if you'd like to hack on this by contacting me on legdur@cyplo.dev or via cyplo@peninsula.industries on the Fediverse.


git clone https://git.cyplo.dev/cyplo/legdur.git