2022-07-04 21:36:33 +02:00
|
|
|
#!/bin/sh
|
2023-05-24 18:33:43 +02:00
|
|
|
|
2023-11-24 15:46:14 +01:00
|
|
|
# reset="\033[0m"
|
|
|
|
# big="\033[12m"
|
2023-11-21 14:34:46 +01:00
|
|
|
IFS='
|
|
|
|
'
|
2023-05-24 18:33:43 +02:00
|
|
|
|
2023-11-22 20:42:33 +01:00
|
|
|
types=${1:-ext2,ext3,ext4,xfs,btrfs,vfat}
|
2023-11-21 14:34:46 +01:00
|
|
|
first=true
|
2023-11-24 15:46:14 +01:00
|
|
|
for mnt in $(findmnt -Py -t "$types"); do
|
2024-01-02 19:09:46 +01:00
|
|
|
[ "$first" = "false" ] && printf " | "
|
|
|
|
eval $mnt
|
|
|
|
[ -d "$TARGET" ] || break
|
|
|
|
name=$TARGET
|
|
|
|
printf "%b" "${name}: $(df -H "$TARGET" | awk ' /[0-9]/ {print $3 "/" $2}')"
|
|
|
|
first=false
|
2023-11-21 14:34:46 +01:00
|
|
|
done
|
|
|
|
printf "\n"
|