Answer the question
In order to leave comments, you need to log in
How to always show only the last line of the output?
I want to see in the terminal only the current disk loading. The utilities that I found show the log by time like this:
How can I make it always show only the last, most recent line?
Answer the question
In order to leave comments, you need to log in
So far, only such crutches:
dstat --disk-util -D sda > /tmp/dst.txt &
watch -t "tail -1 /tmp/dst.txt"
to make dstat friends with watch, you need to read man to the end:
watch -c dstat --disk-util -D sda 1 1
Well, or you can use your hands:
clear ;while true; do tput cup 0 0; dstat --disk-util -D sda 1 1;sleep 1;done
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question