Works for me on Ubuntu linux3.16.0. What's your system and locale?
---------- Post updated at 22:36 ---------- Previous update was at 21:22 ----------
Given you are using awk anyhow, and several times, and hoping your date will eventually work, you might want to consider replacing your script with (an extended version of) this:
Last edited by RudiC; 04-16-2015 at 05:18 AM..
Reason: Typo correction
Hi,
Can I get a script to list out all the users, who has not logged on since last 90 days. Last command in not working due due to /var/adm/wtmpx is more than 2 GB.
Thanks in advance.
Regards,
Roni (10 Replies)
Hi,
Here is the script that I have written to check if a particular user is has logged out, and if yes, then a mail needs to be sent to the management the details of whatever has been captured by the script command.
echo "The current users are:"
who | awk '{print $1}' | sort > temp1
cp... (1 Reply)
Hi All,
I am trying to write a script to get the user information & the command executed.
I tried something like this :
w | sort | awk '{print$5$6$7}'
My requirement is to identify the users who execute the same command at same time.
I need the user name & the... (2 Replies)
My admin needs a shell script in Korn that will show conditions based on users logged in. I have never used the Korn shell and have no clue what I am doing, can anyone help.
here are the conditions that need to be returned.
if users are below 5
displays should be: performance is high
if... (1 Reply)
For the first 4 users only that are currently logged in output their effective user id.
It's not important the order in which each logged in i just want to have the top 4.
Same question as here...... (0 Replies)
Hi,
How to find the users who did not login into a UNIX box (thru ssh/ftp or any other way) for last 90 days?
I think of using "finger" or "last" command to findout each user's last login and then find number of days between today and that day. Is there any other better way or anyone prepared... (1 Reply)
Discussion started by: reddyr
1 Replies
LEARN ABOUT DEBIAN
zlocate
ZLOCATE(1) General Commands Manual ZLOCATE(1)NAME
zlocate - find a user using Zephyr
SYNOPSIS
zlocate [ -a | -d ] [ -1 ] [ -p ] user ...
DESCRIPTION
Zlocate uses the Zephyr(1) Notification Service to find where a user is currently logged in. If the user is not logged in, or has set his
location information such that you do not have access to see it, zlocate prints "Hidden or not logged-in". Otherwise, each machine that
the user is currently logged into is printed, along with the time of login and location. The location is usually the X window system dis-
play name of the user's display, but may be the terminal name if he is not using X or for some other reason is only using the terminal
interface to zwgc(1).
By default, all zlocate requests are authenticated using Kerberos. If you do not have Kerberos tickets, or for some other reason do not
want to authenticate, the -d option will turn off authentication. The -a option is the default, authentication on.
When locating multiple users, zlocate will display the user name on a line by itself, followed by the locations for that user. To display
the user name on the same line as the output, use the -1 option (the numeral one).
To look up multiple users in parallel asynchronously, use the -p option.
DIAGNOSTICS
zlocate exits with status zero (0) if at least one user was found, and one (1) if no users were found.
SEE ALSO zctl(1), zephyr(1), znol(1), zwgc(1), zhm(8), zephyrd(8), X(1)
Project Athena Technical Plan Section E.4.1, `Zephyr Notification Service'
AUTHORS
Robert S. French (MIT-Project Athena)
Marc Horowitz (MIT-Project Athena)
RESTRICTIONS
Copyright (c) 1987,1988 by the Massachusetts Institute of Technology. All Rights Reserved.
zephyr(1) specifies the terms and conditions for redistribution.
MIT Project Athena April 17, 1990 ZLOCATE(1)