2021-01-19 20:56:51 +01:00

17 lines
346 B
Bash
Executable File

#!/bin/sh
used() {
df -h "$1" | awk 'NR==2 { print $3 "/" $2 " GB" }' | sed 's/G\//\//g;s/G / /g'
}
server_used() {
ssh homeserver df -h | grep '/dev/mapper/md0-crypt' | \
awk '{print $3 "/" $2 " GB" }' | sed 's/G\//\//g;s/G / /g'
}
root="$(used /)"
home="$(used /home)"
server="$(server_used)"
echo "/ $root,  $home,  $server"