Is there any way you can display the parent of a dataset by zfs (get/list) command ? I do not need to list for example for a dataset all it''s children by using -r just to get the parent on a child. There are way''s of grepping and doing some preg matches but i was wondering if there is any way by doing this directly. Thanks. -- ing. Vadim Comanescu S.C. Syneto S.R.L. str. Vasile Alecsandri nr 2, Timisoara Timis, Romania -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20100525/51f240a7/attachment.html>
On 5/25/2010 2:55 AM, Vadim Comanescu wrote:> Is there any way you can display the parent of a dataset by zfs > (get/list) command ? I do not need to list for example for a dataset > all it''s children by using -r just to get the parent on a child. There > are way''s of grepping and doing some preg matches but i was wondering > if there is any way by doing this directly. Thanks.I''m not aware of any, but it seems like that would be a straight-forward thing to add to the zfs command... maybe file an RFE. - Garrett> > -- > ing. Vadim Comanescu > S.C. Syneto S.R.L. > str. Vasile Alecsandri nr 2, Timisoara > Timis, Romania > > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20100525/d975dcf5/attachment.html>
On Tue, May 25, 2010 at 2:55 AM, Vadim Comanescu <vadim at syneto.net> wrote:> Is there any way you can display the parent of a dataset by zfs (get/list) > command ? I do not need to list for example for a dataset all it''s children > by using -r just to get the parent on a child. There are way''s of grepping > and doing some preg matches but i was wondering if there is any way by doing > this directly. Thanks.If you know the current dataset name, there''s no real need to have the parent as a property. Just subtract the last "/" and any trailing characters. Heck, you could use ''dirname'' in scripts to do it for you. bhigh at basestar:~$ zfs list -o name rpool/ROOT/snv_134 NAME rpool/ROOT/snv_134 bhigh at basestar:~$ dirname rpool/ROOT/snv_134 rpool/ROOT -B -- Brandon High : bhigh at freaks.com
On 5/25/2010 8:24 AM, Brandon High wrote:> On Tue, May 25, 2010 at 2:55 AM, Vadim Comanescu<vadim at syneto.net> wrote: > >> Is there any way you can display the parent of a dataset by zfs (get/list) >> command ? I do not need to list for example for a dataset all it''s children >> by using -r just to get the parent on a child. There are way''s of grepping >> and doing some preg matches but i was wondering if there is any way by doing >> this directly. Thanks. >> > If you know the current dataset name, there''s no real need to have the > parent as a property. Just subtract the last "/" and any trailing > characters. Heck, you could use ''dirname'' in scripts to do it for you. > > bhigh at basestar:~$ zfs list -o name rpool/ROOT/snv_134 > NAME > rpool/ROOT/snv_134 > bhigh at basestar:~$ dirname rpool/ROOT/snv_134 > rpool/ROOT > > -B > >Good point. :-) I was thinking of mount point names, which are different from data set names. -- Garrett