Fienode
Discover identical CoW copies, analogous to an inode
Install / Use
/learn @pwaller/FienodeREADME
fienode - discover identical CoW copies
Something analogous to an inode for Copy-on-Write (CoW, cp --reflink) files.
Discover when two files on a CoW filesystem share identical physical data.
Why's it called fienode? It's analogous to an inode,
but derived from File Extents.
Warning: Proof-of-concept. Alpha quality software, use at your own risk.
See Also:
sharedextents, for comparing physical extents between two filesfilefrag -v, for listing physical extents
Installation
From source
go get github.com/pwaller/fienode
Binary Download
See releases.
- fienode-linux-amd64 v1.0
Usage: fienode <filename>...
For example:
$ fienode foo
foo 8a53b838c97f1f9712e6a77e2bc00dd1922d32e9
$ cp foo bar
$ fienode bar
bar c829d10e6ccc0f90fc41d1492e423e2cabfe2bca
$ cp --reflink foo baz
$ fienode baz
baz 8a53b838c97f1f9712e6a77e2bc00dd1922d32e9
# (note: baz and foo share the same hash)
How it works
The result is the a SHA1 hash of the physical extents of the file.
See "How to verify a file copy is reflink/CoW?" on unix.stackexchange.com for more information.
Caveats
There may be bugs. This will delete all your data and eat your cat. When it does, that is your problem. Keep backups, folks.
I just copied a large file x to y with cp --reflink x y. For about a
minute, it gave equal results. Thereafter, BTRFS decided - seemingly at
random - to coalesce two extents in one of the files but not the other.
So fienode then returned different results, even though the majority of the
file was actually shared.
License
MIT.
Related Skills
node-connect
345.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
104.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
