Darren J Moffat wrote: > Template Version: @(#)sac_nextcase 1.68 02/23/09 SMI > This information is Copyright 2009 Sun Microsystems > 1. Introduction > 1.1. Project/Component Working Name: > zfs list -d and zfs get -d > 1.2. Name of Document Author/Supplier: > Author: Chris Gerhard > 1.3 Date of This Document: > 12 March, 2009 > 4. Technical Description > > This project proposes a -d flag for both the list and get sub-commands to the > zfs command. The -d option would take a single argument of a Natural number > that would allow the commands to recurse to a depth equal to that integer > from the dataset specified. > > $ zfs list rpool > NAME USED AVAIL REFER MOUNTPOINT > rpool 24.5G 42.5G 29.5K /rpool > $ zfs list -r rpool > NAME USED AVAIL REFER MOUNTPOINT > rpool 24.5G 42.5G 29.5K /rpool > rpool/ROOT 3.47G 42.5G 18K /rpool/ROOT > rpool/ROOT/zfs103 3.47G 42.5G 3.47G / > rpool/dump 1.00G 42.5G 1.00G - > rpool/swap 20G 62.2G 276M - > $ zfs list -d 1 rpool > NAME USED AVAIL REFER MOUNTPOINT > rpool 24.5G 42.5G 29.5K /rpool > rpool/ROOT 3.47G 42.5G 18K /rpool/ROOT > rpool/dump 1.00G 42.5G 1.00G - > rpool/swap 20G 62.2G 276M - > $ >
This is a minor quibble, but I was surprised to see that -d is a replacement for -r instead of an option that modifies its behavior. In other words, I would have expected the example above to be $ zfs list -r -d 1 rpool for consistency with the way the other zfs list modifiers work. On the other hand, I can't see why you would use -d without -r, and your syntax will save a few keystrokes. At the very least, you might want to silently allow the combination of -r and -d without generating an error. That will help anyone who thinks of -d as a modifier instead of an action. Scott -- Scott Rotondo Principal Engineer, Solaris Security Technologies President, Trusted Computing Group Phone/FAX: +1 408 850 3655 (Internal x68278)