Project

General

Profile

Actions

Bug #2399

closed

zfs manual page does not document use of "zfs diff"

Added by Jon Strabala over 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
manpage - manual pages
Start date:
2012-03-12
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

There seems to be an undocumented functionality "zfs diff" not in the manual page for zfs, for example if I run "zfs diff" I get the following:

root[329]: zfs diff
must provide at least one snapshot name
usage:
        diff [-FHt] <snapshot> [snapshot|filesystem]

For the property list, run: zfs set|get

For the delegated permission list, run: zfs allow|unallow

Now if I give if a snapshot and a volume it works as follows:

root[330]: zfs list -t snapshot
NAME                              USED  AVAIL  REFER  MOUNTPOINT
rpool/ROOT/OI_151a2_dev@install   768M      -  2.74G  -
zp2m2s/pm@20120312                 70K      -  2.62G  -

root[331]: time zfs diff zp2m2s/pm@20120312 zp2m2s/pm
M       /pm/
M       /pm/TARFILES
M       /pm/cromeu
+       /pm/cromeu/E
0.0u 0.0s 0:00 20% 0+0k 0+0io 0pf+0w

I was curious as to what the options are. It appears from usr/src/cmd/zfs/zfs_main.c that they have to do with flags

Flag 'F' in the code ZFS_DIFF_CLASSIFY seems to list the file/object type

root[333]: time zfs diff -F zp2m2s/pm@20120312 zp2m2s/pm
M       /       /pm/
M       /       /pm/TARFILES
M       /       /pm/cromeu
+       F       /pm/cromeu/E
0.0u 0.0s 0:00 33% 0+0k 0+0io 0pf+0w

Flag 'H' in the code ZFS_DIFF_PARSEABLE - not sure what it does I could dig some more - but it list just like the default in my small limited test case.

root[335]: time zfs diff -H zp2m2s/pm@20120312 zp2m2s/pm
M       /pm/
M       /pm/TARFILES
M       /pm/cromeu
+       /pm/cromeu/E
0.0u 0.0s 0:00 33% 0+0k 0+0io 0pf+0w

Flag 't' in the code ZFS_DIFF_TIMESTAMP - seems to list the time of the change

root[334]: time zfs diff -t zp2m2s/pm@20120312 zp2m2s/pm
1331590148.212285380    M       /pm/
1331590240.024192970    M       /pm/TARFILES
1331590240.024174448    M       /pm/cromeu
1331590255.827126040    +       /pm/cromeu/E
0.0u 0.0s 0:00 33% 0+0k 0+0io 0pf+0w

Still the features should be documented in the 'zfs' manual page.


Related issues

Has duplicate illumos gate - Bug #545: no documentation for zfs 'diff' in zfs man pageClosed2010-12-18

Actions
Actions

Also available in: Atom PDF