09-16-2010
Shell script to display user logged in within given time
how can i know which users have logged in at specified given start and end time in 24 hour format?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
writing a script that will check every 5 seconds whether a particular user has
logged into the system
# Determine if someone is logged on
# Version 4.0
if
then
echo “ Incorrect number of arguments”
echo “Usage: $ ison4 <user>”
else
user=“$1”
if who | grep “$user” > /dev/null
then... (2 Replies)
Discussion started by: kim187
2 Replies
2. Shell Programming and Scripting
Hello,
i know who command gives you the time when particular user logged in. And subtracting today's date and time from the one found in who we can get how much time user logged in. But this can get very much clumsy as we can't subtract date directly in unix . Is there any other way or command... (4 Replies)
Discussion started by: salman4u
4 Replies
3. UNIX for Dummies Questions & Answers
Hi all..
I was trying to do a little shell script, that would list users and their login times, lets say like last 5 days.
But I couldnt figure out how to count users login times from previous days. Any tips?
Funny that nobody has do this kinda script before, or atleast I couldnt find on... (2 Replies)
Discussion started by: Kimmo_
2 Replies
4. Shell Programming and Scripting
Ok, so, in order to install some dependencies of a program I made, a script has to be run as root. The thing is that I have to copy some things into the home folder of currently logged in user, but the variable $HOME returns '/root' and the $USER returns 'root' :(
Is there any way to see who is... (7 Replies)
Discussion started by: hakermania
7 Replies
5. Shell Programming and Scripting
Hello all,
I want to display all the user logged last week and know the time tnat they are connected. I have been looking for a solution in the Forum, but I didn't find.
Thanks in advance (4 Replies)
Discussion started by: ahernandez
4 Replies
6. UNIX for Dummies Questions & Answers
Hi all
So I am thinking my inability to cope with math is bogging me down here so Im asking for help.
I want to determine how long a user has been logged on for by using the date and who commands to determine the time they have been logge don.
My problem is that I keep getting the wrong... (2 Replies)
Discussion started by: losingit
2 Replies
7. Homework & Coursework Questions
I was given this to do,
Write a Shell script to automatically check that a specified user is logged in to the computer.
The program should allow the person running the script to specify the name of the user to be checked, the frequency in seconds at which the script should check. If a... (0 Replies)
Discussion started by: operator
0 Replies
8. Shell Programming and Scripting
Hi
I have below scenario, I hope this could be possible, but as of now no idea how to implement this.
Mount point in this location /abc/mp, and there will different users who will be executing one the file shell1.sh file located in /abs/mp, but every user will execute this shell1.sh file from... (1 Reply)
Discussion started by: shekharjchandra
1 Replies
9. Shell Programming and Scripting
Hi,
I am relatively new to the cluster administration and shell scripting. I need help on a shell script which can help me determine how many cpu's over time, any particular ( or all registered users on a cluster ) are using. To generate data say over a period of week and list of users and their... (6 Replies)
Discussion started by: anuj06
6 Replies
10. Shell Programming and Scripting
help me (1 Reply)
Discussion started by: sonu pandey
1 Replies
RWHO(1) BSD General Commands Manual RWHO(1)
NAME
rwho -- who is logged in on local machines
SYNOPSIS
rwho [-a]
DESCRIPTION
The rwho command produces output similar to who, but for all machines on the local network. If no report has been received from a machine
for 11 minutes then rwho assumes the machine is down, and does not report users last known to be logged into that machine.
If a users hasn't typed to the system for a minute or more, then rwho reports this idle time. If a user hasn't typed to the system for an
hour or more, then the user will be omitted from the output of rwho unless the -a flag is given.
FILES
/var/spool/rwho/whod.* information about other machines
SEE ALSO
finger(1), rup(1), ruptime(1), rusers(1), who(1), rwhod(8)
HISTORY
The rwho command appeared in 4.3BSD.
BUGS
This is unwieldy when the number of machines on the local net is large.
Linux NetKit (0.17) August 15, 1999 Linux NetKit (0.17)