add script for fetching days with local logins
This commit is contained in:
parent
57fc513912
commit
cdedae5d6d
1 changed files with 13 additions and 0 deletions
13
bin/lastlocallogins
Executable file
13
bin/lastlocallogins
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/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: $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
|
Loading…
Reference in a new issue