LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to list all other users' program which are running background? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-list-all-other-users-program-which-are-running-background-4175561319/)

Mike_Brown 12-12-2015 06:34 PM

How to list all other users' program which are running background?
 
I want to find all the programs that are not ran by myself?
I tried using
Code:

w
. But it only list the users who log in the current computer. I want to find the user and the program which are running background.
My user name is
Code:

zwang10
.

erik2282 12-12-2015 06:41 PM

maybe:

ps aux | grep zwang

erik2282 12-12-2015 06:41 PM

...........

Mike_Brown 12-12-2015 06:44 PM

Quote:

Originally Posted by erik2282 (Post 5463442)
...........

It only gives my information.

suicidaleggroll 12-12-2015 08:19 PM

He said he wanted all processes not run as himself.
Code:

ps aux | grep -v zwang
Or just get rid of the grep entirely to show all processes.

Mike_Brown 12-12-2015 08:24 PM

Quote:

Originally Posted by suicidaleggroll (Post 5463469)
He said he wanted all processes not run as himself.
Code:

ps aux | grep -v zwang
Or just get rid of the grep entirely to show all processes.

Thanks. I tried your code. But I got USER of
Code:

root
and
Code:

gdm
. I do not want to see
Code:

root
(and I do not know what is
Code:

gdm
)

erik2282 12-12-2015 08:44 PM

Quote:

Originally Posted by suicidaleggroll (Post 5463469)
He said he wanted all processes not run as himself.[/code]

Or just get rid of the grep entirely to show all processes.

sorry, i probably shouldn't be posting while buzzed from this porter beer. Right, just ps aux without grep'ing for username.

suicidaleggroll 12-12-2015 08:52 PM

Quote:

Originally Posted by Mike_Brown (Post 5463471)
Thanks. I tried your code. But I got USER of
Code:

root
and
Code:

gdm
. I do not want to see
Code:

root
(and I do not know what is
Code:

gdm
)

Yes, that's what you asked for...all processes not owned by you. The only processes that remain will be the ones running as root, and the many other "service" users. What is it you want?

Mike_Brown 12-12-2015 08:58 PM

Quote:

Originally Posted by suicidaleggroll (Post 5463483)
Yes, that's what you asked for...all processes not owned by you. The only processes that remain will be the ones running as root, and the many other "service" users. What is it you want?

For example, there is an user whose name is mike. And mike is running his program in this public computer background (I am logging in this computer). How can I see all the programs he is running background?

suicidaleggroll 12-13-2015 09:11 AM

Then change the grep to search for mike
Code:

ps aux | grep mike
Code:

man ps
man grep



All times are GMT -5. The time now is 10:24 PM.