Skip to content

Instantly share code, notes, and snippets.

@jmerrifield
Created November 16, 2016 16:10
Show Gist options
  • Save jmerrifield/5f03c64da308a735a4b57e980caaf8e9 to your computer and use it in GitHub Desktop.
Save jmerrifield/5f03c64da308a735a4b57e980caaf8e9 to your computer and use it in GitHub Desktop.
List latest snapshot for each zfs dataset
zfs list -H -o name -r zmirror | while read -r line; do zfs list -t snapshot -o name -s creation -r "$line" | tail -1; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment