1eda14cbcSMatt Macy.\" 2eda14cbcSMatt Macy.\" CDDL HEADER START 3eda14cbcSMatt Macy.\" 4eda14cbcSMatt Macy.\" The contents of this file are subject to the terms of the 5eda14cbcSMatt Macy.\" Common Development and Distribution License (the "License"). 6eda14cbcSMatt Macy.\" You may not use this file except in compliance with the License. 7eda14cbcSMatt Macy.\" 8eda14cbcSMatt Macy.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*271171e0SMartin Matuska.\" or https://opensource.org/licenses/CDDL-1.0. 10eda14cbcSMatt Macy.\" See the License for the specific language governing permissions 11eda14cbcSMatt Macy.\" and limitations under the License. 12eda14cbcSMatt Macy.\" 13eda14cbcSMatt Macy.\" When distributing Covered Code, include this CDDL HEADER in each 14eda14cbcSMatt Macy.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15eda14cbcSMatt Macy.\" If applicable, add the following below this CDDL HEADER, with the 16eda14cbcSMatt Macy.\" fields enclosed by brackets "[]" replaced with your own identifying 17eda14cbcSMatt Macy.\" information: Portions Copyright [yyyy] [name of copyright owner] 18eda14cbcSMatt Macy.\" 19eda14cbcSMatt Macy.\" CDDL HEADER END 20eda14cbcSMatt Macy.\" 21eda14cbcSMatt Macy.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. 22eda14cbcSMatt Macy.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> 23eda14cbcSMatt Macy.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. 24eda14cbcSMatt Macy.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. 25eda14cbcSMatt Macy.\" Copyright (c) 2014, Joyent, Inc. All rights reserved. 26eda14cbcSMatt Macy.\" Copyright (c) 2014 by Adam Stevko. All rights reserved. 27eda14cbcSMatt Macy.\" Copyright (c) 2014 Integros [integros.com] 28eda14cbcSMatt Macy.\" Copyright 2019 Richard Laager. All rights reserved. 29eda14cbcSMatt Macy.\" Copyright 2018 Nexenta Systems, Inc. 30eda14cbcSMatt Macy.\" Copyright 2019 Joyent, Inc. 31eda14cbcSMatt Macy.\" 32da5137abSMartin Matuska.Dd March 16, 2022 33eda14cbcSMatt Macy.Dt ZFS-DIFF 8 34eda14cbcSMatt Macy.Os 3516038816SMartin Matuska. 36eda14cbcSMatt Macy.Sh NAME 377877fdebSMatt Macy.Nm zfs-diff 3816038816SMartin Matuska.Nd show difference between ZFS snapshots 39eda14cbcSMatt Macy.Sh SYNOPSIS 407877fdebSMatt Macy.Nm zfs 41eda14cbcSMatt Macy.Cm diff 42681ce946SMartin Matuska.Op Fl FHth 43eda14cbcSMatt Macy.Ar snapshot Ar snapshot Ns | Ns Ar filesystem 4416038816SMartin Matuska. 45eda14cbcSMatt Macy.Sh DESCRIPTION 46eda14cbcSMatt MacyDisplay the difference between a snapshot of a given filesystem and another 47eda14cbcSMatt Macysnapshot of that filesystem from a later time or the current contents of the 48eda14cbcSMatt Macyfilesystem. 49eda14cbcSMatt MacyThe first column is a character indicating the type of change, the other columns 50eda14cbcSMatt Macyindicate pathname, new pathname 51eda14cbcSMatt Macy.Pq in case of rename , 52eda14cbcSMatt Macychange in link count, and optionally file type and/or change time. 53eda14cbcSMatt MacyThe types of change are: 5416038816SMartin Matuska.Bl -tag -compact -offset Ds -width "M" 5516038816SMartin Matuska.It Sy - 5616038816SMartin MatuskaThe path has been removed 5716038816SMartin Matuska.It Sy + 5816038816SMartin MatuskaThe path has been created 5916038816SMartin Matuska.It Sy M 6016038816SMartin MatuskaThe path has been modified 6116038816SMartin Matuska.It Sy R 6216038816SMartin MatuskaThe path has been renamed 6316038816SMartin Matuska.El 64eda14cbcSMatt Macy.Bl -tag -width "-F" 65eda14cbcSMatt Macy.It Fl F 66eda14cbcSMatt MacyDisplay an indication of the type of file, in a manner similar to the 677877fdebSMatt Macy.Fl F 68eda14cbcSMatt Macyoption of 69eda14cbcSMatt Macy.Xr ls 1 . 7016038816SMartin Matuska.Bl -tag -compact -offset 2n -width "B" 7116038816SMartin Matuska.It Sy B 7216038816SMartin MatuskaBlock device 7316038816SMartin Matuska.It Sy C 7416038816SMartin MatuskaCharacter device 7516038816SMartin Matuska.It Sy / 7616038816SMartin MatuskaDirectory 7716038816SMartin Matuska.It Sy > 7816038816SMartin MatuskaDoor 7916038816SMartin Matuska.It Sy |\& 8016038816SMartin MatuskaNamed pipe 8116038816SMartin Matuska.It Sy @ 8216038816SMartin MatuskaSymbolic link 8316038816SMartin Matuska.It Sy P 8416038816SMartin MatuskaEvent port 8516038816SMartin Matuska.It Sy = 8616038816SMartin MatuskaSocket 8716038816SMartin Matuska.It Sy F 8816038816SMartin MatuskaRegular file 8916038816SMartin Matuska.El 90eda14cbcSMatt Macy.It Fl H 91eda14cbcSMatt MacyGive more parsable tab-separated output, without header lines and without 92eda14cbcSMatt Macyarrows. 93eda14cbcSMatt Macy.It Fl t 94eda14cbcSMatt MacyDisplay the path's inode change time as the first column of output. 95681ce946SMartin Matuska.It Fl h 96681ce946SMartin MatuskaDo not 97681ce946SMartin Matuska.Sy \e0 Ns Ar ooo Ns -escape 98681ce946SMartin Matuskanon-ASCII paths. 99eda14cbcSMatt Macy.El 10016038816SMartin Matuska. 101da5137abSMartin Matuska.Sh EXAMPLES 102da5137abSMartin Matuska.\" These are, respectively, examples 22 from zfs.8 103da5137abSMartin Matuska.\" Make sure to update them bidirectionally 104da5137abSMartin Matuska.Ss Example 1 : No Showing the differences between a snapshot and a ZFS Dataset 105da5137abSMartin MatuskaThe following example shows how to see what has changed between a prior 106da5137abSMartin Matuskasnapshot of a ZFS dataset and its current state. 107da5137abSMartin MatuskaThe 108da5137abSMartin Matuska.Fl F 109da5137abSMartin Matuskaoption is used to indicate type information for the files affected. 110da5137abSMartin Matuska.Bd -literal -compact -offset Ds 111da5137abSMartin Matuska.No # Nm zfs Cm diff Fl F Ar tank/test@before tank/test 112da5137abSMartin MatuskaM / /tank/test/ 113da5137abSMartin MatuskaM F /tank/test/linked (+1) 114da5137abSMartin MatuskaR F /tank/test/oldname -> /tank/test/newname 115da5137abSMartin Matuska- F /tank/test/deleted 116da5137abSMartin Matuska+ F /tank/test/created 117da5137abSMartin MatuskaM F /tank/test/modified 118da5137abSMartin Matuska.Ed 119da5137abSMartin Matuska. 120eda14cbcSMatt Macy.Sh SEE ALSO 121eda14cbcSMatt Macy.Xr zfs-snapshot 8 122