Hacker News new | ask | show | jobs
by ghostfish 4990 days 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.
1 comments

This works with sorting, and it's easier to pick big files out at a glance. I would use this as often as -h
`ls -lhS` works just fine to sort with human-readable sizes, at least on Fedora.
You could also use 'ls -lh | sort -h'.
I believe that's only supported in newer versions of sort.