zfs-diff(8)

zfs-diff8

Show difference between zfs snapshots

Usage

zfs {diff [-FHth] snapshot snapshot | filesystem}

Overview

Display the difference between a snapshot of a given filesystem and another snapshot of that filesystem from a later time or the current contents of the filesystem. The first column is a character indicating the type of change, the other columns indicate pathname, new pathname (in case of rename), change in link count, and optionally file type and/or change time. The types of change are:

-

The path has been removed

+

The path has been created

M

The path has been modified

R

The path has been renamed

-F

Display an indication of the type of file, in a manner similar to the -F option of ls(1).

B

Block device

C

Character device

/

Directory

>

Door

|

Named pipe

@

Symbolic link

P

Event port

=

Socket

F

Regular file

-H

Give more parsable tab-separated output, without header lines and without arrows.

-t

Display the path's inode change time as the first column of output.

-h

Do not \0ooo-escape non-ASCII paths.

Examples

Example 1 : No 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

Releases

15 releases since FreeBSD 13.0-RELEASE; the text changed 5 times.

  1. 13.0
  2. 13.1
  3. 13.2–13.5
  4. 14.0–14.5
  5. 15.0–15.1
  6. 16.0

-h since FreeBSD 13.2-RELEASE.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.