Skip to content

Instantly share code, notes, and snippets.

@lbr88
Created September 11, 2016 20:32
Show Gist options
  • Save lbr88/125fd134a0973bf4290aef712fbb8b62 to your computer and use it in GitHub Desktop.
Save lbr88/125fd134a0973bf4290aef712fbb8b62 to your computer and use it in GitHub Desktop.
count zfs files
zpoolname=$1;
zfs list |grep $zpoolname/ |while read line; do mount=$(echo $line |cut -d" " -f5); echo $mount:; find $mount -type f| wc -l; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment