LinuxQuestions.org
Review your favorite Linux distribution.
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 03-19-2010, 08:30 AM   #1
Koreanu
LQ Newbie
 
Registered: Mar 2010
Posts: 1

Rep: Reputation: 0
Helps with linux command for displaying users


Hello. Can someone please tell me how I can use grep to display all users running a particular command. Thanks
 
Old 03-19-2010, 08:36 AM   #2
Zuulie
LQ Newbie
 
Registered: Mar 2010
Location: London
Distribution: Ubuntu
Posts: 16

Rep: Reputation: 1
There are loads of ways. This is one:
Code:
ps -ef | grep ' command' | awk '{print $1}' | sort -u
Replace 'command' with the command you're after. Leave the space before the command, though.
 
Old 03-19-2010, 08:39 AM   #3
rn_
Member
 
Registered: Jun 2009
Location: Orlando, FL, USA
Distribution: Suse, Redhat
Posts: 127
Blog Entries: 1

Rep: Reputation: 25
man ps
man grep
 
Old 03-19-2010, 10:24 AM   #4
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,134

Rep: Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876
w and who mite be useful.
 
  


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
LXer: Mandriva 2009 helps new users to grow LXer Syndicated Linux News 0 10-16-2008 04:10 AM
LXer: New book helps users master Ubuntu LXer Syndicated Linux News 0 07-14-2006 05:33 AM
Users Command displaying incorrect Usernames Sarolearthy Linux - General 11 03-29-2006 08:02 PM
Displaying users email quota in SM? panicbox Linux - Software 3 01-19-2006 12:34 AM
LXer: Innovative New Software Helps Linux Users Double Their Desktops LXer Syndicated Linux News 0 12-17-2005 07:01 PM

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

All times are GMT -5. The time now is 05:30 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