Hi-
I am newish to the mac osx unix interface. I want to set up top so that it always displays the username. I can use this command to do this:
top -ocpu -P ' PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE USER' -p '$aaaa ^bbbbbbbbb $cccc $wwwwwww $ee $ffff-$ggggg $hhhh- $iiii- $jjjj- $llll- $nnnnnnnn'
This works great! The username displays last each time.
BUT, since I always want top to act this way, I put this into my etc/profile file as an alias, just the same way:
alias top="top -ocpu -P ' PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE USER' -p '$aaaa ^bbbbbbbbb $cccc $wwwwwww $ee $ffff-$ggggg $hhhh- $iiii- $jjjj- $llll- $nnnnnnnn'"
This does NOT work. When I do top, I get this on each PID line:
top % - - - - -
???what am I doing wrong???
This is a mac running osx 10.5 server.
Thanks!
Mike