I have below code snippet written by someone but I don't understand what
sort -t' ' -rn +2 -3 does.
ps aux|tr -s ' '|cut -f1-3,11 -d' '|grep $USER|sort -t' ' -rn +2 -3|cut -f2 -d' '|head -5
-3 options. I know
-r is for reverse and
-n is for numbers.
The command does a lot of unnecessary work. You can replace it by the following command using
pgrep -U"$USER" | sort -r | head -5
Btw, in order to simply understand what
sort -t' ' -rn +2 -3 means, you should follow the comment from
@1_CR below your question.