How can i show a list of cpu consuming processes?

Best Answer

Why use ps when you can do it easily with the top command?

If you must use ps , try this.

ps aux | sort -nrk 3,3 | head -n 5

If you want something that's truly 'top'esq with constant updates, use watch

watch "ps aux | sort -nrk 3,3 | head -n 5"