clean up docs, add docs for `-l`

This commit is contained in:
Dave Eddy 2021-11-30 23:05:41 -05:00
parent e4ba772f2c
commit 5c3f3d934f
5 changed files with 26 additions and 7 deletions

View File

@ -4,23 +4,25 @@ ZFS Prune Snapshots Changes
Not Yet Released
----------------
- Show snapshot size (used) and number of snapshots processed
- Show snapshot size (used) and number of snapshots processed (6e3891ddd1)
- Add list only option (`-l`) to just list datasets that match (e4ba772f2c)
`v1.3.0`
--------
- Add recursive deletion option (-R) (482420faba)
- Add recursive deletion option (`-R`) (482420faba)
`v1.2.0`
--------
- Add zfs binary check ([#8](https://github.com/bahamas10/zfs-prune-snapshots/pull/8))
- Support inverting of prefix/suffix match ([#17](https://github.com/bahamas10/zfs-prune-snapshots/pull/17))
- Support inverting of prefix/suffix match (`-i`)
([#17](https://github.com/bahamas10/zfs-prune-snapshots/pull/17))
`v1.1.0`
--------
- Support suffix matching (-s) (e7aa72160f8)
- Support suffix matching (`-s`) (e7aa72160f8)
`v1.0.1`
--------

View File

@ -53,7 +53,7 @@ be considered for deletion - possible specifiers are
Usage
-----
usage: zfs-prune-snapshots [-hniqvV] [-p <prefix] <time> [[dataset1] ...]
usage: zfs-prune-snapshots [-hnliqRvV] [-p <prefix>] [-s <suffix>] <time> [[dataset1] ...]
remove snapshots from one or more zpools that match given criteria
@ -78,6 +78,10 @@ Usage
remove snapshots older than two months on the tank pool that end
with the string "_frequent"
# zfs-prune-snapshots -i -p 'autosnap_' 1M zones
remove snapshots older than a month on the zones pool that do not
start with the string "autosnap_"
timespec
the first argument denotes how old a snapshot must be for it to
be considered for deletion - possible specifiers are
@ -93,10 +97,13 @@ Usage
options
-h print this message and exit
-n dry-run, don't actually delete snapshots
-l list only mode, just list matching snapshots names
without deleting (like dry-run mode with machine-parseable output)
-p <prefix> snapshot prefix string to match
-s <suffix> snapshot suffix string to match
-i invert matching of prefix and suffix
-i invert matching of prefix and suffix
-q quiet, do not printout removed snapshots
-R recursively delete, pass '-R' directly to 'zfs destroy'
-v increase verbosity
-V print the version number and exit

View File

@ -18,6 +18,10 @@ print this message and exit
\fB\fC\-n\fR
dry\-run, don't actually delete snapshots
.TP
\fB\fC\-l\fR
list only mode, just list matching snapshots names without deleting (like
dry\-run mode with machine\-parseable output)
.TP
\fB\fC\-p <prefix>\fR
snapshot prefix string to match
.TP

View File

@ -27,6 +27,10 @@ OPTIONS
`-n`
dry-run, don't actually delete snapshots
`-l`
list only mode, just list matching snapshots names without deleting (like
dry-run mode with machine-parseable output)
`-p <prefix>`
snapshot prefix string to match

View File

@ -11,7 +11,7 @@ VERSION='v1.3.0'
usage() {
local prog=${0##*/}
cat <<-EOF
usage: $prog [-hniqRvV] [-p <prefix>] [-s <suffix>] <time> [[dataset1] ...]
usage: $prog [-hnliqRvV] [-p <prefix>] [-s <suffix>] <time> [[dataset1] ...]
remove snapshots from one or more zpools that match given criteria
@ -55,6 +55,8 @@ usage() {
options
-h print this message and exit
-n dry-run, don't actually delete snapshots
-l list only mode, just list matching snapshots names
without deleting (like dry-run mode with machine-parseable output)
-p <prefix> snapshot prefix string to match
-s <suffix> snapshot suffix string to match
-i invert matching of prefix and suffix