7 ms·
My thoughts exactly. This is just complexity for complexity's sake. Useful as an exercise, but the -h flag already does this is an even more readable manner.
by ghostfish 14y ago
My thoughts exactly. This is just complexity for complexity's sake. Useful as an exercise, but the -h flag already does this is an even more readable manner.
- bajsejohannes 14y agoThis works with sorting, and it's easier to pick big files out at a glance. I would use this as often as -h
- cheald 14y ago`ls -lhS` works just fine to sort with human-readable sizes, at least on Fedora.
- runejuhl 14y agoYou could also use 'ls -lh | sort -h'.
- sliverstorm 14y agoI believe that's only supported in newer versions of sort.