Last active
March 15, 2021 10:09
-
-
Save phmarek/327fe756992a13683f757daa0d60344a to your computer and use it in GitHub Desktop.
Show progress of BTRFS snapshot removal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
P="${1:-.}" | |
prev=0 | |
while sleep 30 ; do | |
C=$(btrfs sub list -d "$P" | wc -l) | |
if [[ "$C" != "$prev" ]] | |
then | |
prev="$C" | |
echo "$(date) $C $(btrfs fi df "$P" | grep ^Meta)" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment