Track and filter the output of the last command

1 User has rated as useful.
Login to rate this answer.
By Typing Who command

1 User has rated as useful.
Login to rate this answer.
By writing "who -Hu" you get following details o/p
Name Line Time Activity PID Hostname
Login to rate this answer.
Use w command give time from when the user is logged in.
w is extended who command.
Login to rate this answer.
Using SIGALRM
Login to rate this answer.
who -u|sort -rk4
Login to rate this answer.
Indu Sharma
Answered On : Jul 29th, 2011
Current_time=date +%H:%M
who -u | awk ' $4 - $Current_time == 5 {print } '
Login to rate this answer.
Disna
Answered On : Jan 6th, 2012
last -5|grep -i "logged in"|wc -l
last -5|grep -v "logged out"|wc -l
Login to rate this answer.
sonia
Answered On : Feb 19th, 2012
Current_time=`date +%H%M`
who -u | awk $Current_time - $4 <= 5 { print }
Login to rate this answer.