-1

I want to check the disk usage with a readable size (option -h)

[root@iz2ze9wve43n2nyuvmsfx5z /]# du -sh ./* 2>/dev/null | sort -nr
914M    ./var
568K    ./tmp
523M    ./root
496K    ./run
156M    ./boot
37M ./etc
16K ./lost+found
4.0K    ./srv
4.0K    ./opt
4.0K    ./mnt
4.0K    ./media
4.0K    ./home
2.4G    ./usr
0   ./sys
0   ./sbin
0   ./proc
0   ./lib64
0   ./lib
0   ./dev
0   ./bin

It display 568K > 523M

How could I solve the problem?

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
Wizard
  • 2,503

1 Answers1

3
du -sh ./* 2>/dev/null | sort -hr
Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
kevlinux
  • 389