From eaa45cff1eb10940121f449a9750a8c1f87a1766 Mon Sep 17 00:00:00 2001 From: MorganGeek Date: Fri, 3 Jul 2020 07:12:40 +0200 Subject: [PATCH] add aliases for getting login history - inspired by https://superuser.com/questions/916440/view-all-login-history-on-macbook-pro-running-mac-os-x-10-6-8/1476867#1476867 --- dot_zsh_aliases | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dot_zsh_aliases b/dot_zsh_aliases index 177a1e2..c7931a3 100644 --- a/dot_zsh_aliases +++ b/dot_zsh_aliases @@ -134,14 +134,14 @@ alias ze='vim ~/.zshrc' # zsh profile editing alias zf='vim ~/.zsh_functions' # edit zsh_functions alias za='vim ~/.zsh_aliases' # edit zsh_aliases -# System info +# System Utils alias systeminfo='neofetch' alias monitoring='glances' - -# System Utils alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend" # Lock the screen (when going AFK) alias reload="exec ${SHELL} -l" # Reload the shell (i.e. invoke as a login shell) alias sc="source $HOME/.zshrc" +alias lastlogin="log show --style syslog --last 1d | awk '/Enter/ && /unlockUIBecomesActive/ {print \$1 \" \" \$2}'" +alias loginhistory='lastlogin' # Infrastructure alias awsls='awsls -profile default -region eu-west-1 --attributes tags aws_instance'