ZFS-DIFF(8)
π ZFS-DIFF(8) π
okay bestie, so this is zfs-diff from the System Manager's Manual, and it's genuinely one of the most useful little tools in the whole ZFS family, no cap.
β¨ NAME β¨
zfs-diff β show difference between ZFS snapshots π¦
πΈ SYNOPSIS πΈ
zfs diff [-FHth] snapshot snapshot|filesystem
π DESCRIPTION π
So what this does is it shows you the difference between a snapshot of a given filesystem and another snapshot of that same filesystem from a later time, OR the current contents of the filesystem. Basically a glow-up reveal for your data. β¨
The first column is a character telling you the type of change. The other columns are giving pathname, new pathname (in the rename case, obviously π), change in link count, and optionally file type and/or change time.
The types of change are, and this is important so pay attention bestie:
-β The path has been removed π+β The path has been created πMβ The path has been modified βοΈRβ The path has been renamed π
β OPTIONS β
-Fβ Displays an indication of the type of file, in a manner similar to the-Foption ofls(1). Here's the whole lil alphabet of file types, memorise it iykyk:Bβ Block deviceCβ Character device/β Directory>β Door|β Named pipe@β Symbolic linkPβ Event port=β SocketFβ Regular file
-Hβ Gives you more parsable tab-separated output, without header lines and without arrows. so if you're piping this into a script, this is your main character flag fr fr π₯-tβ Displays the path's inode change time as the first column of output. like a little timestamp baddie in front π-hβ Do not\0ooo-escape non-ASCII paths. so your weird lil unicode filenames get to live their truth π
π EXAMPLES π
π Example 1: Showing the differences between a snapshot and a ZFS Dataset
The following example shows how to see what has changed between a prior snapshot of a ZFS dataset and its current state. The -F option is used to indicate type information for the files affected.
# zfs diff -F tank/test@before tank/test
M / /tank/test/
M F /tank/test/linked (+1)
R F /tank/test/oldname -> /tank/test/newname
- F /tank/test/deleted
+ F /tank/test/created
M F /tank/test/modified
look at that output. directory modified, a linked file went up by one link count, a rename with the lil -> arrow, one deleted, one created, one modified. the whole character arc in six lines. we love to see it. π
π«Ά SEE ALSO π«Ά
okay that's the whole page bestie, you ate that, go diff some snapshots and slay β¨
this one's from OpenZFS, dated July 11, 2022 β mwah, kisses, take care of your datasets ππ
π¦ where this page comes from
- alpine 3.23: zfs-doc 2.4.4-r0 Β· CDDL-1.0
- alpine 3.24: zfs-doc 2.4.4-r0 Β· CDDL-1.0
- nixos 26.05: zfs-user 2.4.4
- nixpkgs unstable: zfs-user 2.4.4
- ubuntu resolute: zfsutils-linux 2.4.1-1ubuntu5 Β· CDDL-1.0
- ubuntu resolute: zfsutils-linux 2.4.1-1ubuntu5.1 Β· CDDL-1.0
- ubuntu stonking: zfsutils-linux 2.4.4-1ubuntu4 Β· CDDL-1.0
- π the page's license: CDDL-1.0
- Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved
- Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
- Copyright (c) 2011, 2019 by Delphix. All rights reserved
- Copyright (c) 2013 by Saso Kiselkov. All rights reserved
- Copyright (c) 2014, Joyent, Inc. All rights reserved
- Copyright (c) 2014 by Adam Stevko. All rights reserved
- Copyright (c) 2014 Integros [integros.com]
- Copyright 2019 Richard Laager. All rights reserved
- Copyright 2018 Nexenta Systems, Inc
- Copyright 2019 Joyent, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms