개인적으로 저는 GNU 정렬의 힘과 결합했습니다.
du -ch | sort -h
이렇게하면 크기가 사람이 읽을 수있는 형식으로 정렬됩니다. 예를 들면 다음과 같습니다.
$ du -h /usr/ | head -20 | sort -h
8.0K /usr/src/linux-headers-3.2.0-3-common/include/misc
12K /usr/src/linux-headers-3.2.0-3-common/include/drm/i2c
12K /usr/src/linux-headers-3.2.0-3-common/include/net/netfilter/ipv4
16K /usr/src/linux-headers-3.2.0-3-common/include/net/netfilter/ipv6
20K /usr/src/linux-headers-3.2.0-3-common/include/net/phonet
28K /usr/src/linux-headers-3.2.0-3-common/include/acpi/platform
52K /usr/src/linux-headers-3.2.0-3-common/include/net/netns
60K /usr/lib32/libv4l
76K /usr/src/linux-headers-3.2.0-3-common/include/net/caif
96K /usr/src/linux-headers-3.2.0-3-common/include/scsi/fc
108K /usr/src/linux-headers-3.2.0-3-common/include/net/bluetooth
112K /usr/src/linux-headers-3.2.0-3-common/include/drm/ttm
148K /usr/src/linux-headers-3.2.0-3-common/include/net/netfilter
264K /usr/src/linux-headers-3.2.0-3-common/include/rdma
284K /usr/src/linux-headers-3.2.0-3-common/include/acpi
596K /usr/src/linux-headers-3.2.0-3-common/include/drm
608K /usr/src/linux-headers-3.2.0-3-common/include/scsi
668K /usr/games
6.3M /usr/lib32/gconv
8.9M /usr/lib32
보낸 사람 man sort
:
-h, --human-numeric-sort
compare human readable numbers (e.g., 2K 1G)
그것은 여전히 당신이 신경 쓰지 않는 것을 보여 주지만, 지금 당신이하는 것을 찾기가 매우 쉽습니다.