Hi Ali,

(2014/12/16 11:01), Ali AlipourR wrote:
Hi

I think it will be to add option to "btrfs subvolume list" command to
also show the property of sub volumes (ro, compression,...)? do this
is possible?

Of course it's possible by writing some code :-D

Is "btrfs property get <subvol>" (and some one liner) insufficient for
your purpose? If you want to just list properties of each subvolumes
instead of listing properties with existing fields, it can be
accomplished as follows.

===============================================================================
# btrfs sub list /btrfstest
# btrfs sub cre /btrfstest/sub1
Create subvolume '/btrfstest/sub1'
# btrfs sub cre /btrfstest/sub2
Create subvolume '/btrfstest/sub2'
# btrfs sub list /btrfstest/
ID 382 gen 39625 top level 5 path sub1
ID 383 gen 39626 top level 5 path sub2
# for i in $(btrfs sub list /btrfstest | cut -d ' ' -f 9) ; do echo -n $i': ' ; 
btrfs prop get /btrfstest/$i ; done
sub1    ro=false
sub2    ro=false
===============================================================================

Thanks,
Satoru


Thanks,
Ali
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to