Output looks like this:
wtmp begins Wed Aug 29 13:06 2001
...
rob: 4 logins 26.13 total time
#!/usr/local/bin/bash last | tail -1; last | awk '{print $1}' | grep -v wtmp | sort | uniq - +c | perl -e 'while (<>) {my ($h, $w) = split; next unless $w; @l = sp +lit /\s+/, `ac -p $w`; printf "%20s: %5d logins %8s total time \n", $ +l[1], $h, $l[2]; }'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Learning about users
by Hofmator (Curate) on Aug 31, 2001 at 13:27 UTC |