diff options
-rw-r--r-- | functions/misc_functions.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/functions/misc_functions.sh b/functions/misc_functions.sh index a943573e5fd5..d8f0c79d1378 100644 --- a/functions/misc_functions.sh +++ b/functions/misc_functions.sh @@ -106,3 +106,21 @@ function is_online { return 1 fi } + + +function du-it-live () { + # live updates the du information for the current directory + directory=$1 + + while true; do + du -hc $directory | tail -n 1 | tr -d '\n' && echo -n ' ' && sleep 0.5 + + # elipsis + echo -n '.' && sleep 0.5 && + echo -n '.' && sleep 0.5 && + echo -n '.' && sleep 0.5 && + + # clear the three-dots + echo -n '\b\b\b' && echo -n ' ' && echo -n '\r' + done +} |