You are using etime
. This is the elapsed time, in days, hours, etc., which is suitable for sorting numerically. If this is the first column, I think ps will automatically sort it.
Otherwise, you can override the sort order with --sort
, but make sure it is after the -o
option, for example:
ps -o pid,user:32,start,etime,state,time,vsz,args --sort=etime
source share