Skip to content

Instantly share code, notes, and snippets.

@FunctionDJ
Created September 17, 2026 23:49
Show Gist options
  • Select an option

  • Save FunctionDJ/c6bbc9bcc40490900ce99841ae989cf6 to your computer and use it in GitHub Desktop.

Select an option

Save FunctionDJ/c6bbc9bcc40490900ce99841ae989cf6 to your computer and use it in GitHub Desktop.
Number of ZFS snapshots per dataset
zfs list -H -o name | while read ds; do
printf "%s: %s\n" "$ds" "$(zfs list -H -t snapshot -o name -r "$ds" | wc -l)"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment