PowerShell_Scripts/zfs/zls.ps1

11 lines
362 B
PowerShell

$local:prev = "";
zfs list -o name,used,avail,refer,canmount,mounted,mountpoint $args |
grep -v 'docker/' |
ForEach-Object {
$local:tmpPrev = $_ -replace '^(\w+(\W\w+(\W\w+)?)?).*','$1';
if( $tmpPrev -notmatch "^$prev" -and $prev -notin ('','NAME') ) {
'-----------------'
};
$prev = $tmpPrev;
$_
}