14 lines
303 B
Text
14 lines
303 B
Text
|
#!/bin/sh
|
||
|
|
||
|
F="$(for i in $(find /var/log -maxdepth 1 -name "wtmp*"|sort -h);do echo -n "-f $i ";done)"
|
||
|
cat << EOF
|
||
|
-----
|
||
|
Alle Tage mit lokalen Logins
|
||
|
User: ${1:-$USER}
|
||
|
Host: $(hostname)
|
||
|
Files: $F
|
||
|
-----
|
||
|
|
||
|
EOF
|
||
|
last -w -F -a $F |grep -v "pts/\|reboot\|wtmp"|awk '$1 == u {print $4,$5,$7}' u=${1:-$USER}|uniq
|