Re: [zfs-discuss] zfs select

2009-06-23 Thread Mike Forey
Thanks  Darren,

I might request that it gets added.

That is, if anyone else thinks it might be a useful feature?

Regards,
Mike.
-- 
This message posted from opensolaris.org
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] zfs select

2009-06-23 Thread Darren J Moffat

Mike Forey wrote:

Hi,

I'd like to be able to select zfs filesystems, based on the value of properties.

Something like this: 


zfs select mounted=yes


What is the output of the above ?
Would you want to specify multiple properties ?
What about for properties that aren't index values (eg sharenfs) ?
What about ranges for index valued properties ?


Is anyone aware if this feature might be available in the future?


Log a request for it at http://bugs.opensolaris.org/


If not, is there a clean way of achieving the same result?


Other than scripting around zfs get no I can't.

--
Darren J Moffat
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] zfs select

2009-06-23 Thread Mike Forey
very tidy, thanks! :)
-- 
This message posted from opensolaris.org
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] zfs select

2009-06-23 Thread Allan Black

Mike Forey wrote:

zfs select mounted=yes
If not, is there a clean way of achieving the same result?


How about this:

zfs list -o name,mounted | awk '$2 == "yes" {print $1}'

Allan
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss