]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r351813: bectl(8): implement sorting for 'bectl list' output
authorKyle Evans <kevans@FreeBSD.org>
Mon, 9 Sep 2019 17:56:14 +0000 (17:56 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Mon, 9 Sep 2019 17:56:14 +0000 (17:56 +0000)
commitf32c3b2e900b4a3cc68093d96f8ebef159bf42e4
treef6e23915214f98ec506199e07bf40fb5fd72e21f
parentf30aa08a6596f891364a81cd54b15ea34ac303bd
MFC r351813: bectl(8): implement sorting for 'bectl list' output

Allow 'bectl list' to sort output by a given property name. The property
name is passed in using a command-line flag, '-c' for ascending order and
'-C' for descending order. The properties allowed to sort by are:

- name (the default output, even if '-c' or '-C' are not used)
- creation
- origin
- used
- usedds
- usedsnap
- usedrefreserv

The default output for 'bectl list' is now ascending alphabetical order of
BE name.

To sort by creation time from earliest to latest, the command would be
'bectl list -c creation'
sbin/bectl/bectl.8
sbin/bectl/bectl.c
sbin/bectl/bectl_list.c