truestuff/zfs_prune_all_snapshots

6 lines
161 B
Bash
Executable File

#! /usr/bin/env bash
DO="${DO:-echo}"
printf "%s\n" "${@}" | xargs -rn1 zfs list -r -t snapshot -Ho name -s creation -s name | xargs -rn1 ${DO} zfs destroy -v