When I do ps -ef|grep python
I get the following:
myusername 4492 2994 0 10:32 pts/0 00:00:01 /home/myusername/.virtualenvs/myproject/bin/ipython manage.py runserver
root 6665 1 0 10:42 ? 00:00:00 /usr/bin/python /usr/lib/system-service/system-service-d
myusername 14051 13497 0 11:28 pts/7 00:00:00 grep --color=auto python
How do I get only the user who is running the process, the pid and the command run for the process as in the following output instead?
myusername 4492 /home/myusername/.virtualenvs/myproject/bin/ipython manage.py runserver
root 6665 /usr/bin/python /usr/lib/system-service/system-service-d
Best Answer
I guess you are looking for the -o argument:
So the command you want would be (Ubuntu):
under OpenSolaris the command is: