1LASTLOG(8)                System Management Commands                LASTLOG(8)
2
3
4

NAME

6       lastlog - reports the most recent login of all users or of a given user
7

SYNOPSIS

9       lastlog [options]
10

DESCRIPTION

12       lastlog formats and prints the contents of the last login log
13       /var/log/lastlog file. The login-name, port, and last login time will
14       be printed. The default (no flags) causes lastlog entries to be
15       printed, sorted by their order in /etc/passwd.
16

OPTIONS

18       The options which apply to the lastlog command are:
19
20       -b, --before DAYS
21          Print only lastlog records older than DAYS.
22
23       -h, --help
24          Display help message and exit.
25
26       -t, --time DAYS
27          Print the lastlog records more recent than DAYS.
28
29       -u, --user LOGIN
30          Print the lastlog record for user with specified LOGIN only.
31
32       The -t flag overrides the use of -u.
33
34       If the user has never logged in the message ** Never logged in** will
35       be displayed instead of the port and time.
36

NOTE

38       The lastlog file is a database which contains info on the last login of
39       each user. You should not rotate it. It is a sparse file, so its size
40       on the disk is usually much smaller than the one shown by "ls -l"
41       (which can indicate a really big file if you have in passwd users with
42       a high UID). You can display its real size with "ls -s".
43

FILES

45       /var/log/lastlog
46          Database times of previous user logins.
47

CAVEATS

49       Large gaps in UID numbers will cause the lastlog program to run longer
50       with no output to the screen (i.e. if in lastlog database there is no
51       entries for users with UID between 170 and 800 lastlog will appear to
52       hang as it processes entries with UIDs 171-799).
53
54
55
56System Management Commands        07/30/2006                        LASTLOG(8)
Impressum