in reply to View last login times of everyone on your system
Or go with the command-line one-liner: last | perl -lane 'print unless $F[1] eq "ftp" or $logins{$F[0]}++' Caveat: there may be other connections you want to exclude besides ftp. Season to taste.open(LASTLOG, 'last|') or die "Try Randal's script instead: $!\n"; my %logins; while (<LASTLOG>) { my ($name, $from) = split ' ', $_, 3; print unless $from eq 'ftp' or $logins{$name}++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: &cow;Re: View last login times of everyone on your system
by merlyn (Sage) on Jan 15, 2004 at 19:57 UTC | |
by Roy Johnson (Monsignor) on Jan 15, 2004 at 20:23 UTC |