How can I display the
top results in my terminal in real time so that the list is sorted by memory usage?
Use quick tip using top command in linux/unix
hit Shift + f, then choose the display to order by memory usage by hitting key n then press Enter. You will see active process ordered by memory usage.
Or you can just press M after running the
On OS X 10.10 the command
The command line option
which sorts by the column
I don't know why or how but this is pretty much different between Unix systems and even between Linux distributions. For example
It seems like the -o flag will take the actual column name. So if the top command shows only "mem" then the command should be "top -o mem".
For the ubuntu machine I am testing with, the column is called "%MEM". On the OSX Yosemite I tried, it is "mem".