Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Hashes?

19 views
Skip to first unread message

Dan Sladden

unread,
Feb 12, 2025, 5:00:24 AMFeb 12
to Ledger
From the docs:

--hashes ALGO

Records the chained hash of each transaction in a Hash metadata value, according to the hashing algorithm given by the ALGO argument (at the moment, only sha512 is supported). 


But when I run ledger --hashes I get
Error: Illegal option --hashes

ledger --version  gives me
Ledger 3.3.2-20230330, the command-line accounting tool
without support for gpg encrypted journals and with Python support

--hashes sounds really useful to avoid unintended corruption in my ~6Mb of ledger files. What's the easiest way to get hold of a version of ledger that supports them on Ubuntu 22.04 please?

Thanks
Dan

Eric S Fraga

unread,
Feb 12, 2025, 5:52:04 AMFeb 12
to ledge...@googlegroups.com
Response below/inline for email Dan Sladden wrote:
> (original email sent 12 Feb 2025 at 02:00)
>
> But when I run *ledger --hashes* I get
> Error: Illegal option --hashes

Do you not need to pass an algorithm to use for the hashing, e.g.

ledger --hashes sha512

?

--
Eric S Fraga via gnus (Emacs 31.0.50 2025-01-13) on Debian bookworm/sid

Dan Sladden

unread,
Feb 12, 2025, 7:27:44 AMFeb 12
to ledge...@googlegroups.com
I get the same response to ledger --hashes sha512 as I do to ledger --hashes :
Error: Illegal option --hashes

Dan

--

---
You received this message because you are subscribed to the Google Groups "Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ledger-cli/87r0431lmd.fsf%40ucl.ac.uk.

Eric S Fraga

unread,
Feb 12, 2025, 7:45:32 AMFeb 12
to ledge...@googlegroups.com
Looking at the documentation (info document) for ledger that I actually
have on my system, which is not the same as that in the link you gave,
there is no mention of the --hashes option.

Robin H. Johnson

unread,
Feb 12, 2025, 10:24:38 AMFeb 12
to ledge...@googlegroups.com
On Wed, Feb 12, 2025 at 02:00:24AM -0800, Dan Sladden wrote:
> *ledger --version* gives me
> Ledger 3.3.2-20230330, the command-line accounting tool
> without support for gpg encrypted journals and with Python support
20230330 is before the --hashes work was merged to master on
2024/Aug/05: https://github.com/ledger/ledger/pull/2300

> --hashes sounds really useful to avoid unintended corruption in my ~6Mb of
> ledger files. What's the easiest way to get hold of a version of ledger
> that supports them on Ubuntu 22.04 please?
I'd suggest putting your Ledgers in version control [e.g. Git] as the
fastest path to improving file integrity.

--
Robin Hugh Johnson
Gentoo Linux: Dev, Infra Lead, Foundation Treasurer
E-Mail : rob...@gentoo.org
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85
GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136
signature.asc

John Wiegley

unread,
Feb 12, 2025, 2:13:17 PMFeb 12
to Dan Sladden, Ledger
>>>>> "DS" == Dan Sladden <dan.s...@gmail.com> writes:

DS> But when I run ledger --hashes I get
DS> Error: Illegal option --hashes

DS> ledger --version  gives me
DS> Ledger 3.3.2-20230330, the command-line accounting tool
DS> without support for gpg encrypted journals and with Python support

The --hashes option (which does take the algorithm as an argument) was added
to the code base on Nov 22, 2023. I don’t believe it’s been released under an
official tag yet.

John
Reply all
Reply to author
Forward
0 new messages