On 01/09/09 01:44, Ross wrote: > Can I ask why we need to use -c or -d at all? We already have -r to > recursively list children, can't we add an optional depth parameter to that? > > You then have: > zfs list : shows current level (essentially -r 0) > zfs list -r : shows all levels (infinite recursion) > zfs list -r 2 : shows 2 levels of children
An optional depth argument to -r has already been suggested: http://mail.opensolaris.org/pipermail/zfs-discuss/2009-January/054241.html However, other zfs subcommands such as destroy, get, rename, and snapshot also provide -r options without optional depth arguments. And its probably good to keep the zfs subcommand option syntax consistent. On the other hand, if all of the zfs subcommands were modified to accept an optional depth argument to -r, then this would not be an issue. But, for example, the top level(s) of datasets cannot be destroyed if that would leave orphaned datasets. BTW, when no dataset is specified, zfs list is the same as zfs list -r (infinite recursion). When a dataset is specified then it shows only the current level. Does anyone have any non-theoretical situations where a depth option other than 1 or 2 would be used? Are scripts being used to work around this problem? -- Rich _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss