ZFS-DIFF(8) System Manager's Manual ZFS-DIFF(8)

# [NAME](#NAME)

`zfs-diff` — show difference between ZFS snapshots

# [SYNOPSIS](#SYNOPSIS)

`zfs` `diff` \[`-FHth`] `snapshot` `snapshot`|`filesystem`

# [DESCRIPTION](#DESCRIPTION)

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**](#M)

The path has been modified

[**R**](#R)

The path has been renamed

[`-F`](#F)

Display an indication of the type of file, in a manner similar to the `-F` option of [ls(1)](/man/os/zfs/ls.1).

[**B**](#B)

Block device

[**C**](#C)

Character device

[**/**](#/)

Directory

[**&gt;**](#_)

Door

[**|**](#_~2)

Named pipe

[**@**](#@)

Symbolic link

[**P**](#P)

Event port

[**=**](#=)

Socket

[**F**](#F~2)

Regular file

[`-H`](#H)

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

[`-t`](#t)

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

[`-h`](#h)

Do not [**\\0**](#0)`ooo`-escape non-ASCII paths.

# [EXAMPLES](#EXAMPLES)

## [Example 1: Showing the differences between a snapshot and a ZFS Dataset](#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
```

# [SEE ALSO](#SEE_ALSO)

[zfs-snapshot(8)](/man/os/zfs/zfs-snapshot.8)

July 11, 2022 OpenZFS

---

Document: zfs-diff(8) from zfs 2.4.4-r3 (Chainguard OS)
Source: https://github.com/openzfs/zfs
