Skip to main content

All Questions

Tagged with
0 votes
1 answer
1k views

sort du -sh by size in human readable

with the command du -sh * I get the summary of files in MB,GB, etc. If I use du -s * | sort -nk1 I get the summary sort by size. How I can get the summary sort by size in MB, GB, etc? Edit the ...
juanpablo's user avatar
  • 7,274
0 votes
2 answers
738 views

How do I sort command-line output?

I'm trying to use du to sort the output by filesize, but it doesn't looks like there's an option for that. Can I pipe it into another command to handle the sorting?
nipponese's user avatar
  • 1,154