Hello again! Long time no see. ;)
So... as I'm not able to use my dedicated desktop computer while we are relocated to the next-door apartment that is too tiny to set up any comfortable space for a workstation, I've been using my laptop instead.
Today I decided to upgrade the Linux on my laptop to the latest KDE Neon has to offer, I came upon a problem, and that is that my harddrive has some consistency issues with files. I decided to run the btrfs balancing tool btrfs fi balance /home
.
It's a peculiar one, since it doesn't give out any output. So at first I used the dmesg -w
command to see what it is doing, but found out a btrfs command for a progress report: btrfs balance status /home
that gives out a static progress report like this:
root@trabant:~# btrfs balance status /home
Balance on '/home' is running
138 out of about 180 chunks balanced (178 considered), 37% left
The only problem was that I needed to repeat that command every time I wanted to see the progress, and I wanted to see it in real-time.
The solution is a simple one: a while
loop. :) Like this:
while sleep 5; do (btrfs balance status /home&) ; done
And I got a page full of status reports.
I wanted to do better, so I added clear
to the beginning of the line.
while sleep 5; do (clear && btrfs balance status /home&) ; done
Result:

Now the progress report updates cleanly in the top of the window.
Neat, huh? :)
If I come up with other nice tips, I'll be sure to post them here. :)
See ya!