
232
|
Chapter 3: Linux Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
Options
-n number, -number
Choose how many lines of logins to display. Thus, last -7 or
last -n 7 displays seven lines.
-R Do not show the hostname from which logins originated.
-a Display the hostname from which logins originated.
-d Display both IP address and hostname.
-f filename
Get the list of logins from a file you choose. The default source
is /var/log/wtmp.
-i Display IP address and hostname. Display the IP address in
the numbers-and-dots notation.
-o Read an old-style (libc5 application) wtmp file. Not likely to be
useful on newer systems.
-x Display shutdown messages and runlevel messages.
lastb
lastb [options] [username] [ttynumber]
Display a list of recent bad login attempts (from the /var/log/btmp
file). Accepts the same option flags and arguments as last.
lastlog
lastlog [options]
System administration command. Print the last login times for
system accounts. Login information is read from the file /var/log/
lastlog.
Options
-tn, --time n
Print only logins more recent than n days ago.
-uname, --user name
Print only login information for user name.
ld
ld [options] objfiles
Combine several objfiles, in the specified order, into a single
executable object module (a.out by default). ld is the link editor
and is often invoked automatically by compiler commands.