DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

last(C)


last -- indicate last logins of users and teletypes

Syntax

last [ -h ] [ -H hostname ] [ -n limit ] [ -t tty ] [ -w wtmpfile ] [ -W wtmpxfile ]
[ name ]

Description

The last command checks the wtmp file, which records all logins and logouts for information about a user, a tty line or any group of users and lines. The argument name specifies a user name and/or tty line.

The command last -t 01 root would list all root sessions as well as all sessions on /dev/tty01. last prints the sessions of the specified users and ttys, including login name, the line used, the device name, the process ID, plus start time and elapsed time.

last with no arguments prints a record of all logins and logouts, in reverse chronological order.

The options behave as follows:


-h
Do not print a header.

-H hostname
Report on hostname only. If the -W option is not used to specify the pathname of a wtmpx(F) format file, last reads /etc/wtmpx.

-n limit
Limit the report to limit lines.

-t line
Specify the terminal line.

-w wtmpfile
Use wtmpfile instead of /etc/wtmp. Note that wtmpfile must have the same format as /etc/wtmp.

-W wtmpxfile
Use wtmpxfile instead of /etc/wtmpx. Note that wtmpxfile must have the same format as /etc/wtmpx.

Files


/etc/wtmp
login database

/etc/wtmpx
extended version of wtmp

See also

acct(FP), acctcom(ADM), accton(ADM), finger(C), utmp(F), utmpx(F)

Standards conformance

last is not part of any currently supported standard; it is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003