add script to determine space free

This commit is contained in:
c0de 2021-01-25 11:35:56 -06:00
parent 08f5f068ab
commit 573d8a62d9

1
home/bin/space Executable file
View File

@ -0,0 +1 @@
du -k | sort -n | perl -ne 'if ( /^(\d+)\s+(.*$)/){$l=log($1+.1);$m=int($l/log(1024)); printf ("%6.1f\t%s\t%25s | %s\n",($1/(2**(10*$m))),(("K","M","G","T","P")[$m]),"*"x(1.5*$l),$2);}'