Compare commits
2 Commits
7ff404b032
...
0aeb6c5523
| Author | SHA1 | Date | |
|---|---|---|---|
| 0aeb6c5523 | |||
| bfe7a65db2 |
@@ -31,7 +31,7 @@ TMP="${TEXTFILE}.$$"
|
|||||||
# Use df with 1K blocks and convert to bytes
|
# Use df with 1K blocks and convert to bytes
|
||||||
for mount in /boot /persistent /nix; do
|
for mount in /boot /persistent /nix; do
|
||||||
if mountpoint -q "$mount" 2>/dev/null; then
|
if mountpoint -q "$mount" 2>/dev/null; then
|
||||||
read -r size used avail _ <<< $(df -k --output=size,used,avail "$mount" | tail -1)
|
read -r size used avail _ <<< "$(df -k --output=size,used,avail "$mount" | tail -1)"
|
||||||
size_b=$((size * 1024))
|
size_b=$((size * 1024))
|
||||||
used_b=$((used * 1024))
|
used_b=$((used * 1024))
|
||||||
avail_b=$((avail * 1024))
|
avail_b=$((avail * 1024))
|
||||||
|
|||||||
Reference in New Issue
Block a user