TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

CLI tool, written in Rust, to diff directory snapshots

42 点作者 jotaen超过 1 年前

10 条评论

codetrotter超过 1 年前
OP should have a look at ZFS. With large amounts of data I feel that ZFS snapshots might be far more time efficient to compare than diffing full directories.<p>Bonus: FreeBSD is currently considering adding Rust to their base system. They have ZFS natively in FreeBSD already. Perhaps OP will find joy in FreeBSD :D
评论 #39094735 未加载
评论 #39095742 未加载
评论 #39098509 未加载
mustache_kimono超过 1 年前
Curious -- how does your system handle hardlinks? I have a ZFS system which does a ZFS &quot;roll forward&quot;:<p><pre><code> --roll-forward=&lt;ROLL_FORWARD&gt; traditionally &#x27;zfs rollback&#x27; is a destructive operation, whereas httm roll-forward is non-destructive. httm will copy only files and their attributes that have changed since a specified snapshot, from that snapshot, to its live dataset... </code></pre> One of more difficult problems I had to deal with was hardlink resolution. Basically I still have to scan the whole dataset, and create a map of hardlinks before any run.
评论 #39095323 未加载
rhettbull超过 1 年前
I&#x27;ve created a similar tool in python that I find quite useful: <a href="https:&#x2F;&#x2F;github.com&#x2F;RhetTbull&#x2F;dirsnapshot">https:&#x2F;&#x2F;github.com&#x2F;RhetTbull&#x2F;dirsnapshot</a> This doesn&#x27;t compute content hashes as your tool does but is designed to highlight files added, removed, or changed and I use it primarily for reverse engineering projects. One key feature is it can store the snapshot in a sqlite snapshot database that doesn&#x27;t take much space then you can compare the directory against the stored snapshot database at some point in the future. Diffs are computed based on stat() info: mode, ownership, size, mtime. In addition to a CLI it also provides a python API so you can use it directly in your own code.
grow2grow超过 1 年前
&gt; (For some extra “entropy”, by the way, snapdiff also takes the file size into consideration when comparing files.)<p>I get what you mean by &quot;entropy&quot;, but wouldn&#x27;t it be more direct to just say matching hashes will have their file sizes compared as a remedy to the collision?<p>Thanks for the effort, the &quot;back yard diy&quot; utilities are great for learning, especially with an accompanying article.
评论 #39095406 未加载
rpigab超过 1 年前
This looks nice! I like TUI programs for this purpose.<p>Previously, I&#x27;ve used Beyond Compare 4 by Scooter Software (GUI, free to try), it&#x27;s nice to have more options because diff -r doesn&#x27;t get you very far.<p>I also like the ability to find duplicate images or any files regardless of location with Czkawka (Github qarmin&#x2F;czkawka).
gumby超过 1 年前
Why does it matter if it is written in Rust or assembly code?
评论 #39095041 未加载
评论 #39094750 未加载
评论 #39094767 未加载
评论 #39094816 未加载
评论 #39095287 未加载
adamzochowski超过 1 年前
RAR supports both incremental and differential backups.<p>If you make it solid archive and sort files by extensions and enable max compression with ppm, then these backups will be some of the most efficient possible.
hartator超过 1 年前
Isn&#x27;t this just Git?
评论 #39094832 未加载
评论 #39095665 未加载
评论 #39099732 未加载
评论 #39095126 未加载
sys_64738超过 1 年前
What does this do that plain old &quot;diff dir1 dir2&quot; command doesn&#x27;t?
anacrolix超过 1 年前
Could you just dry run rsync? It does exactly this.