diff --git a/bin/lastlocallogins b/bin/lastlocallogins index 2eb563d..ecec804 100755 --- a/bin/lastlocallogins +++ b/bin/lastlocallogins @@ -4,10 +4,10 @@ F="$(for i in $(find /var/log -maxdepth 1 -name "wtmp*"|sort -h);do echo -n "-f cat << EOF ----- Alle Tage mit lokalen Logins -User: $USER +User: ${1:-$USER} Host: $(hostname) Files: $F ----- EOF -last -F -a $F |grep -v "pts/\|reboot\|wtmp"|awk '$1 == u {print $4,$5,$7}' u=$USER|uniq +last -w -F -a $F |grep -v "pts/\|reboot\|wtmp"|awk '$1 == u {print $4,$5,$7}' u=${1:-$USER}|uniq