LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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-20-2007, 03:32 AM   #1
mr.v.
Member
 
Registered: Jun 2006
Distribution: Slackware 11
Posts: 59

Rep: Reputation: 15
how do I display the user of a process using ps?


Hi all when I run
Code:
ps -A
I get a list of PIDs and names but not the user they belong to. the -u option seems to mention users and
Code:
ps -u
prints processes owned by my current user, but I'd like to display ALL users and
Code:
 ps -Au
gives me an error. I was wondering if this is possible? and if so, what's the syntax. The man page is entirely unhelpful.

Thanks for the help!
 
Old 03-20-2007, 03:40 AM   #2
mr.v.
Member
 
Registered: Jun 2006
Distribution: Slackware 11
Posts: 59

Original Poster
Rep: Reputation: 15
uyyy never mind...i figured it out after some more trial/error
Code:
ps -A u
works
I guess you need a space and no dash in front of the lowercase 'u' to get it to work.
 
Old 03-20-2007, 10:29 AM   #3
binary_0011
Member
 
Registered: Apr 2006
Location: Singapore
Distribution: RHEL4,FC4,FC5
Posts: 89

Rep: Reputation: 15
does ps - aux works on slackware?
 
Old 03-20-2007, 01:40 PM   #4
mr.v.
Member
 
Registered: Jun 2006
Distribution: Slackware 11
Posts: 59

Original Poster
Rep: Reputation: 15
yeah it does...Thanks for the help!

it doesn't work with the space between the ps and the - but either
ps -aux
or
ps aux without the - work well. Apparently according to the ps man page ps -aux is not the same as ps aux. Apparently, ps -aux interprets that it should list the processes for user x instead of ps aux which should list processes for all users.

This is one part of linux I feel that I'll never understand. How to pass command line options. I get it when they're complete like --user=<something> --this-does-something-else --this-does-another

but when they're just single letters some programs let you do them without a - like tar and some require a - and the most frustrating is when (like ps) each letter means something different if the - is present or not.
 
  


Reply



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
Start a program for a user as root, with process belonging to user gnashley Programming 4 03-19-2007 01:58 PM
display thread number in process tim24 Linux - General 4 07-07-2006 12:50 AM
Starting process on display :1 noware Linux - General 8 12-01-2005 06:52 AM
Change the display of a running process? ejkeebler Linux - Newbie 3 06-16-2004 08:43 AM
I want to figure out which display a process is running on drgowans Linux - Software 4 11-10-2003 11:32 AM

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

All times are GMT -5. The time now is 07:38 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
Open Source Consulting | Domain Registration