5

Ending user sessions which have been on a program for longer than 1 hour

view full story
linux-howto

http://www.unix.com – hi, im looking to write a script to end user sessions which are on a paticular program and have been for over an hour so I can free up the system a bit. I understand that the "who" command lists the current users logged into the system, however it does not let me see what program they are on and how long they have been on it. If i do a Code: ps -ef | grep <username> then this does provide me with the information I need, question is how do I get it to grep not just one username but every user that is logged into the system currently. Any help would be massively apprec (HowTos)