Is there still any interest in this? I've done a bit of hacking (then searched for this thread - I picked -P instead of -c)...
$ zfs get -P compression,dedup /var NAME PROPERTY VALUE SOURCE rpool/ROOT/zfstest compression on inherited from rpool/ROOT rpool/ROOT/zfstest dedup off default $ pfexec zfs snapshot -P ....@now Creating snapshot <rpool/export/h...@now> Of course create/mkdir would make it into the eventual implementation as well. For those missing this thread in their mailboxes, the conversation is archived at http://mail.opensolaris.org/pipermail/zfs-discuss/2008-July/019762.html. http://mail.opensolaris.org/pipermail/zfs-discuss/2008-July/019762.html Mike On Thu, Jul 10, 2008 at 4:42 AM, Darren J Moffat <darren.mof...@sun.com> wrote: > I regularly create new zfs filesystems or snapshots and I find it > annoying that I have to type the full dataset name in all of those cases. > > I propose we allow zfs(1) to infer the part of the dataset name upto the > current working directory. For example: > > Today: > > $ zfs create cube/builds/darrenm/bugs/6724478 > > With this proposal: > > $ pwd > /cube/builds/darrenm/bugs > $ zfs create 6724478 > > Both of these would result in a new dataset cube/builds/darrenm/6724478 > > This will need some careful though about how to deal with cases like this: > > $ pwd > /cube/builds/ > $ zfs create 6724478/test > > What should that do ? should it create cube/builds/6724478 and > cube/builds/6724478/test ? Or should it fail ? -p already provides > some capbilities in this area. > > Maybe the easiest way out of the ambiquity is to add a flag to zfs > create for the partial dataset name eg: > > $ pwd > /cube/builds/darrenm/bugs > $ zfs create -c 6724478 > > Why "-c" ? -c for "current directory" "-p" partial is already taken to > mean "create all non existing parents" and "-r" relative is already used > consistently as "recurse" in other zfs(1) commands (as well as lots of > other places). > > Alternately: > > $ pwd > /cube/builds/darrenm/bugs > $ zfs mkdir 6724478 > > Which would act like mkdir does (including allowing a -p and -m flag > with the same meaning as mkdir(1)) but creates datasets instead of > directories. > > Thoughts ? Is this useful for anyone else ? My above examples are some > of the shorter dataset names I use, ones in my home directory can be > even deeper. > > -- > Darren J Moffat > _______________________________________________ > zfs-discuss mailing list > zfs-discuss@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss > -- Mike Gerdts http://mgerdts.blogspot.com/ _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss