Search Results

Search: Posts Made By: ughosting
8,782
Posted By ughosting
My Linux code for those interested
#!/bin/bash

NUM_DAYS="0"
TODAY_CODE=$(echo "$(date +%s) / 86400" | bc)

for i in $(cat /etc/passwd | awk -F':' '{print $1}')
do

last | grep ${i} > /dev/null 2>&1

if [ $? -eq 0 ]
...
8,782
Posted By ughosting
Many thanks so far!!
Thanks for the suggestions!

Meanwhile I have come up with this!

It's not fast, but it does the job!

#!/usr/bin/ksh

#####
#
# Set up Global Variables
#
#####

MIN_DAYS=2
MAX_DAYS=90...
8,782
Posted By ughosting
Last time logged in
Working in AIX (so no date -d)

How can i display all the users who have not logged in for more than 40 days?

A small quick script would be usefull, my scripts are always taking to long to...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 04:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy