Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-19-2010, 08:30 AM   #1
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
LQ Newbie
Registered: Mar 2010
Location: London
Distribution: Ubuntu
Posts: 16

Rep: Reputation: 1
There are loads of ways. This is one:
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
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
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,232

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


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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:35 PM.

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