Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Create a login/logout tracking log file for all users' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create a login/logout tracking log file for all users
Authored by: n1mie on Aug 21, '06 08:22:49AM
I use the 'last' command as follows and have it emailed to me from their computer each day at 9 PM (the time when the eldest loses further internet access).

last | grep "$( date | cut -c5-10 )" | cut -c1-10,37-75 | sort

What it does: performs the last command passes the results to grep which filters all but those which match todays date passes that to the cut command which just gives me the username and start to stop times then it is sorted so each user's data is grouped together

---
--Chip

[ Reply to This | # ]