srsudar / eg

Useful examples at the command line.
MIT License
1.8k stars 99 forks source link

improve(du): include info on sort by size #35

Closed scorphus closed 9 years ago

srsudar commented 9 years ago

I can run your OSX example without coreutils (or rather I have it, but I'm using the non-coreutils sort). I also don't need the -h option to do so, at least with the output I'm getting from du. What does the -h flag to sort try to do?

scorphus commented 9 years ago

Hello, Sam! I hope I made it a bit more clear now :smiley: If there's something I could've done better, please just let me know.

srsudar commented 9 years ago

Ohhh, I see what you're saying now. I was missing the obvious that without the -h flag sort will treat 1G as before 1M. Got it. I'm going to look back at your first PR and see if that was better and I just missed it. My bad! Good functionality to know, as well.

srsudar commented 9 years ago

Can you check out my revision and see if you're ok with it? I reverted mostly back to what you had, as I think that is plenty clear with a small bit of explanation. Good addition.

scorphus commented 9 years ago

It looks great! Thanks for accepting and revising it. I'm glad to contribute and pleased to know it adds to your knowledge as well :smiley: