LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-12-2015, 07:34 PM   #1
Mike_Brown
Member
 
Registered: May 2015
Posts: 37

Rep: Reputation: Disabled
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
.
 
Old 12-12-2015, 07:41 PM   #2
erik2282
Member
 
Registered: May 2011
Location: TX
Distribution: Debian, CentOS
Posts: 722

Rep: Reputation: 196Reputation: 196
maybe:

ps aux | grep zwang
 
Old 12-12-2015, 07:41 PM   #3
erik2282
Member
 
Registered: May 2011
Location: TX
Distribution: Debian, CentOS
Posts: 722

Rep: Reputation: 196Reputation: 196
...........

Last edited by erik2282; 12-12-2015 at 07:43 PM. Reason: accidental double post
 
Old 12-12-2015, 07:44 PM   #4
Mike_Brown
Member
 
Registered: May 2015
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by erik2282 View Post
...........
It only gives my information.
 
Old 12-12-2015, 09:19 PM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,561

Rep: Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127
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.
 
Old 12-12-2015, 09:24 PM   #6
Mike_Brown
Member
 
Registered: May 2015
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
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
)

Last edited by Mike_Brown; 12-12-2015 at 09:25 PM.
 
Old 12-12-2015, 09:44 PM   #7
erik2282
Member
 
Registered: May 2011
Location: TX
Distribution: Debian, CentOS
Posts: 722

Rep: Reputation: 196Reputation: 196
Quote:
Originally Posted by suicidaleggroll View Post
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.
 
Old 12-12-2015, 09:52 PM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,561

Rep: Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127
Quote:
Originally Posted by Mike_Brown View Post
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?
 
Old 12-12-2015, 09:58 PM   #9
Mike_Brown
Member
 
Registered: May 2015
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
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?
 
Old 12-13-2015, 10:11 AM   #10
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,561

Rep: Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127Reputation: 2127
Then change the grep to search for mike
Code:
ps aux | grep mike
Code:
man ps
man grep

Last edited by suicidaleggroll; 12-13-2015 at 10:13 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running a program in the background how ??? linuxmarble Linux - Newbie 3 09-07-2014 05:23 AM
[SOLVED] Need help running program in background in BASH Jeff9 Linux - Newbie 23 06-08-2013 12:46 AM
Running program in the background HarryBoy Programming 2 06-12-2008 12:42 PM
Running C Program in Background help ibshar Linux - Newbie 7 10-04-2007 03:41 PM
running a program in background of X using & Dachy Linux - General 1 09-13-2005 12:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration