OSX's LAST command will provide user login history and example output is shown below:
fred ttys002 Tue Apr 8 21:23 still logged in
john ttys003 192.168.1.61 Sat Mar 29 13:34 - 20:51 (07:17)
ruth ttys002 192.168.1.61 Sat Mar 29 12:07 - 12:13 (23:06)
teddy ttys002 192.168.1.61 Sat Mar 29 12:02 - 12:06 (00:04)
teddy ttys002 192.168.1.61 Sat Mar 29 11:58 - 11:58 (00:00)
tint ttys000 Wed Mar 12 21:28 still logged in
reggie ttys001 Wed Mar 12 21:28 still logged in
sylvia console Tue Mar 11 19:21 still logged in
reboot ~ Tue Mar 11 19:13
shutdown ~ Tue Mar 11 19:12
sylvia ttys001 Mon Feb 24 09:25 - 19:12 (15+09:46)
ronnie ttys000 Mon Feb 24 09:25 - 19:12 (15+09:46)
brutm console Mon Feb 24 08:25 - 19:12 (15+10:46)
reboot ~ Mon Feb 24 07:11
shutdown ~ Mon Feb 24 07:09
brutm ttys001 Fri Feb 7 17:14 - 07:09 (16+13:54)
brutm ttys000 Fri Feb 7 17:14 - 07:09 (16+13:54)
brutm console Thu Feb 6 07:16 - 07:09 (17+23:53)
I would like a regex which would provide the details for each column so that I can store these in a database and cater for the situation where the user is still logged in or the end time/duration is known and where there's no IP address.
Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.
If you other experts are anything like me you are always looking into and testing out new features. While I was doing some research one day I ran across an app that I installed on my Mac and used as a security system. Mac OS X: SecureHome uses your …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Learn how to get help with Linux/Unix bash shell commands.
Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell.
Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…