bin/disks @ 8e22b36e5cba

More
author Steve Losh <steve@stevelosh.com>
date Wed, 17 Jul 2024 15:51:26 -0400
parents e80a2a4ea7cd
children (none)
#!/usr/bin/env bash

set -euo pipefail

lsblk -o name,mountpoint,model,label,size,fstype | grep -Pv "^loop" | awk '
NR>1 && /^[a-zA-Z]/ { print "-----------------------------------------------------------------------------------------------------------------------" }
                    { print $0 }
'
echo
echo

OUT=$(df -h)
echo "$OUT" | head -1
echo "$OUT" | head -1 | sed 's/./-/g'
echo "$OUT" | tail +2 | grep -Pv '^/dev/loop' | grep -Pv tmpfs | sort -k6 | grep -P --color '/dev.*\s/$|'

echo
OUT=$(df -i)
echo "$OUT" | head -1
echo "$OUT" | head -1 | sed 's/./-/g'
echo "$OUT" | tail +2 | grep -Pv '^/dev/loop' | grep -Pv tmpfs | sort -k6 | grep -P --color '/dev.*\s/$|'