I recently came across a rather splendid command that shows your drives and their percentage of free space. And it is -

df -hP |column -t |tee >( head -n1 > /dev/stderr ) |grep % |sort -k5nr

and in my case it shows this -

Filesystem  Size  Used  Avail  Use%  Mounted                 on
/dev/sdd1   2.7T  2.0T  579G   78%   /media/boudiccas/back1
/dev/sda1   287G  147G  126G   54%   /
/dev/sde1   2.7T  1.2T  1.5T   46%   /media/boudiccas/back3
/dev/sdc1   917G  298G  573G   35%   /media/boudiccas/back4
/dev/sdb1   1.8T  322G  1.4T   19%   /media/boudiccas/back2
tmpfs       354M  40M   315M   12%   /run
tmpfs       2.1G  80K   2.1G   1%    /run/shm
Filesystem  Size  Used  Avail  Use%  Mounted                 on
none        4.0K  0     4.0K   0%    /sys/fs/cgroup
tmpfs       5.0M  0     5.0M   0%    /run/lock
udev        10M   0     10M    0%    /dev

As you can see it ranks your drives by their usage, which is rather nice.



Comments

comments powered by Disqus