diff options
author | Ondrej Oprala | 2013-08-06 18:19:37 +0200 |
---|---|---|
committer | Karel Zak | 2013-08-12 12:07:52 +0200 |
commit | ce60272039ea11952b15fefb653892dd0da02217 (patch) | |
tree | a44eea1fc9ac4aeb65f001b092cde5de5a25a785 /login-utils/last.1 | |
parent | agetty: -L accepts optional argument (diff) | |
download | kernel-qcow2-util-linux-ce60272039ea11952b15fefb653892dd0da02217.tar.gz kernel-qcow2-util-linux-ce60272039ea11952b15fefb653892dd0da02217.tar.xz kernel-qcow2-util-linux-ce60272039ea11952b15fefb653892dd0da02217.zip |
last: merge sysvinit last/lastb
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils/last.1')
-rw-r--r-- | login-utils/last.1 | 174 |
1 files changed, 118 insertions, 56 deletions
diff --git a/login-utils/last.1 b/login-utils/last.1 index beb691784..4afc6c1f9 100644 --- a/login-utils/last.1 +++ b/login-utils/last.1 @@ -1,62 +1,124 @@ -.TH LAST 1 "March 1992" "util-linux" "User Commands" +'\" -*- coding: UTF-8 -*- +.\" Copyright (C) 1998-2004 Miquel van Smoorenburg. +.\" +.\" This program is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 2 of the License, or +.\" (at your option) any later version. +.\" +.\" This program is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License +.\" along with this program; if not, write to the Free Software +.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +.\" +.\"{{{}}} +.\"{{{ Title +.TH LAST,LASTB 1 "Jul 31, 2004" "" "Linux System Administrator's Manual" +.\"}}} +.\"{{{ Name .SH NAME -last \(em indicate last logins by user or terminal +last, lastb \- show listing of last logged in users +.\"}}} +.\"{{{ Synopsis .SH SYNOPSIS -.ad l .B last -.RB [ \-\fP\fInumber\fP ] -.RB [ \-f -.IR filename ] -.RB [ \-t -.IR tty ] -.RB [ \-h -.IR hostname ] -.RB [ \-i -.IR address ] -.RB [ \-l ] -.RB [ \-y ] -.RI [ name ...] -.ad b +.RB [ \-R ] +.RB [ \-\fInum\fP ] +.RB "[ \-\fBn\fP \fInum\fP ]" +.RB [ \-adFiowx ] +.RB "[ \-\fBf\fP \fIfile\fP ]" +.RB "[ \-\fBt\fP \fIYYYYMMDDHHMMSS\fP ]" +.RI [ name... ] +.RI [ tty... ] +.br +.B lastb +.RB [ \-R ] +.RB [ \-\fInum\fP ] +.RB "[ \-\fBn\fP \fInum\fP ]" +.RB "[ \-\fBf\fP \fIfile\fP ]" +.RB [ \-adFiowx ] +.RI [ name... ] +.RI [ tty... ] +.\"}}} +.\"{{{ Description .SH DESCRIPTION -\fBLast\fP looks back in the \fBwtmp\fP file which records all logins -and logouts for information about a user, a teletype or any group of -users and teletypes. Arguments specify names of users or teletypes of -interest. If multiple arguments are given, the information which -applies to any of the arguments is printed. For example ``\fBlast root -console\fP'' would list all of root's sessions as well as all sessions -on the console terminal. \fBLast\fP displays the sessions of the -specified users and teletypes, most recent first, indicating the times -at which the session began, the duration of the session, and the -teletype which the session took place on. If the session is still -continuing or was cut short by a reboot, \fBlast\fP so indicates. -.LP -The pseudo-user \fBreboot\fP logs in at reboots of the system. -.LP -\fBLast\fP with no arguments displays a record of all logins and -logouts, in reverse order. -.LP -If \fBlast\fP is interrupted, it indicates how far the search has -progressed in \fBwtmp\fP. If interrupted with a quit signal \fBlast\fP -indicates how far the search has progressed so far, and the search -continues. +.B Last +searches back through the file \fB/var/log/wtmp\fP (or the file +designated by the \fB\-f\fP flag) and displays a list of all +users logged in (and out) since that file was created. Names of users +and tty's can be given, in which case \fBlast\fP will show only those entries +matching the arguments. Names of ttys can be abbreviated, thus \fBlast +0\fP is the same as \fBlast tty0\fP. +.PP +When \fBlast\fP catches a \s-2SIGINT\s0 signal (generated by the interrupt key, +usually control-C) or a \s-2SIGQUIT\s0 signal (generated by the quit key, +usually control-\e), \fBlast\fP will show how far it has searched through the +file; in the case of the \s-2SIGINT\s0 signal \fBlast\fP will then terminate. +.PP +The pseudo user \fBreboot\fP logs in each time the system is rebooted. +Thus \fBlast reboot\fP will show a log of all reboots since the log file +was created. +.PP +\fBLastb\fP is the same as \fBlast\fP, except that by default it shows a log +of the file \fB/var/log/btmp\fP, which contains all the bad login attempts. +.\"}}} +.\"{{{ Options .SH OPTIONS -.IP \fB\-\fP\fInumber\fP -limit the number of entries displayed to that specified by \fInumber\fP. -.IP "\fB\-f\fP \fIfilename\fP" -Use \fIfilename\fP as the name of the accounting file instead of -.BR /var/log/wtmp . -.IP "\fB\-h\fP \fIhostname\fP" -List only logins from \fIhostname\fP. -.IP "\fB\-i\fP \fIIP address\fP" -List only logins from \fIIP address\fP. -.IP "\fB\-l\fP" -List IP addresses of remote hosts instead of truncated host names. -.IP "\fB\-t\fP \fItty\fP" -List only logins on \fItty\fP. -.IP "\fB\-y\fP" -Also report year of dates. +.IP "\fB\-f\fP \fIfile\fP" +Tells \fBlast\fP to use a specific file instead of \fB/var/log/wtmp\fP. +.IP \fB\-\fP\fInum\fP +This is a count telling \fBlast\fP how many lines to show. +.IP "\fB\-n\fP \fInum\fP" +The same. +.IP "\fB\-t\fP \fIYYYYMMDDHHMMSS\fP" +Display the state of logins as of the specified time. This is +useful, e.g., to determine easily who was logged in at a particular +time -- specify that time with \fB\-t\fP and look for "still logged +in". +.IP "\fB\-f\fP \fIfile\fP" +Specifies a file to search other than \fB/var/log/wtmp\fP. +.IP \fB\-R\fP +Suppresses the display of the hostname field. +.IP \fB\-a\fP +Display the hostname in the last column. Useful in combination +with the next flag. +.IP \fB\-d\fP +For non-local logins, Linux stores not only the host name of the remote +host but its IP number as well. This option translates the IP number +back into a hostname. +.IP \fB\-F\fP +Print full login and logout times and dates. +.IP \fB\-i\fP +This option is like \fB-d\fP in that it displays the IP number of the remote +host, but it displays the IP number in numbers-and-dots notation. +.IP \fB\-w\fP +Display full user and domain names in the output. +.IP \fB\-x\fP +Display the system shutdown entries and run level changes. +.\"}}} +.SH NOTES +The files \fIwtmp\fP and \fIbtmp\fP might not be found. The system only +logs information in these files if they are present. This is a local +configuration issue. If you want the files to be used, they can be +created with a simple \fBtouch\fP(1) command (for example, +\fItouch /var/log/wtmp\fP). +.\"{{{ Files .SH FILES -/var/log/wtmp \(em login data base -.SH AVAILABILITY -The last command is part of the util-linux package and is available from -ftp://ftp.kernel.org/pub/linux/utils/util-linux/. +/var/log/wtmp +.br +/var/log/btmp +.\"}}} +.\"{{{ Author +.SH AUTHOR +Miquel van Smoorenburg, miquels@cistron.nl +.\"}}} +.\"{{{ See also +.SH "SEE ALSO" +.BR shutdown (8), +.BR login (1), +.BR init (8) +.\"}}} |