![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
ps help
Does anyone know the syntax of the ps command to view all processes of all users currently logged on the system?
|
| Forum Sponsor | ||
|
|
|
|||
|
Ok figured out most of it. I am stuck on the following part.
How do i retrieve a user name from the finger command and assign it to a variable. I would like to loop through each user name. I have used the following so far: finger | cut -d" " -f 1 > File1 This gives me output such as: John.Doe Jane.Doe Tom.Fictional How do I get the name assigned to a variable, then cycle on to the next name? Last edited by beginner1; 04-15-2006 at 01:32 PM. |
|
|||
|
Not much help from anyone!!
I have decided to use sed within a while loop, but my code doesnt seem to work. If anyone knows whats wrong with it, please offer a suggestion. TMP=1 TMP2=5 #TMP2 is the number of lines in the file while [ TMP -lt TMP2 ] do sed -e '$TMP,%d' File1 TMP=`expr $TMP + 1` done |
|
|||
|
here...
If you need to see all processes of all users then depending of version of UNIX you run:
ps -ef for Sytem V clones or ps -aux for BSD clones as list of processes may be long you can use "less" or "more" ps -ef | less or ps -aux | less another way to observe all processes in an organized way is "pstree" command. Please notice that in some system you have to become root to list all processes. If you became "root", you can review all the processes structures in virtual "proc" filesystem at /proc. Get "UNIX Essentials and UNIX Core" DVD, if you have questions of this sort. Hope it helps. Last edited by amro1; 04-15-2006 at 03:12 PM. |
|
|||
|
Larry
Where is the download for Unix or Linix? I am using Windows XP and am cosidering changing my Operating system.
Please send your answer to email address removed
__________________
Have you asked Jesus into your heart? You must to go to heaven! What about your kids? Love yews Larry n Gwen Last edited by Perderabo; 05-15-2006 at 12:46 PM. Reason: Remove email address |
|
|||
|
Uh-oh, let's read this rule one more time...
(10) Don't post your email address and ask for an email reply. The forums are for the benefit of all, so all Q&A should take place in the forums. |
|||
| Google The UNIX and Linux Forums |