Monthly Archives: October 2009

ls command with a sort by size option

I want to sort the files in a given directory by size and ls -S doesn’t seem to work properly on the flavor of UNIX I’m using. I’m therefore using ls -l | sort -k 5,5 | more as an alternative.

Please let me know if you have a better option.