![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| same file being opened by two users at a time | paresh n doshi | UNIX for Advanced & Expert Users | 3 | 01-01-2009 03:04 PM |
| Processes and Users | barbus | Shell Programming and Scripting | 22 | 10-03-2007 08:09 PM |
| users and there processes | iago | UNIX for Dummies Questions & Answers | 3 | 09-10-2007 03:51 PM |
| Command to find last time file was opened | sbr262 | UNIX for Dummies Questions & Answers | 3 | 07-18-2007 03:23 PM |
| How Can I Have Top Display The Top 20 Processes?? | TRUEST | UNIX for Dummies Questions & Answers | 1 | 05-23-2003 09:24 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How to display what processes, users have opened at a given time
Hello,
What i have to do is make a top 10 list of users sorted by the number of processes opened at a given time. Can anyone help me with finding out for a given moment, for all users how many processes each had opened? |
|
||||
|
You could also start with "lsof" and (with some filtering and sorting, of course) have a lot more information about what the processes are actually doing. If it's just a homework assignment, doing something interesting with that should really impress your prof :-)
|
|
||||
|
who | awk '{print $1}' > file.txt
sort file.txt | uniq > file.txt echo ' ' > results.txt w > file2.txt for i in `cat file.txt` do x=`grep -c $i file2.txt` echo $x $i >> results.txt done sort -r results.txt > results2.txt head -10 results2.txt > results.txt This was my version and my teacher suggested i do it in one line. So it's back to the drawing board ![]() |
|
|||||
|
I'm sorry, but for homework questions there's a special subforum. If your question hasn't already been answered, please repost there.
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|