RUSHLAST(1)

NAME
rushlast - show listing of last Rush logins

SYNOPSIS
rushlast [-Hh] [-F STRING] [-f DIR] [-n NUMBER] [--file=DIR] [--format=STRING] [--forward] [--help] [--no-header] [--number=NUMBER] [--usage] [--version] [USER...]

NOTE
This manpage is a short description of rushlast. For a detailed discussion, including examples and usage recommendations, refer to the manual GNU Rush -- a restricted user shell, available in texinfo format. If the info reader and the rush documentation are properly installed on your system, the command

    info rushlast

should give you access to the complete manual.

You can also view the manual using the info mode in emacs(1), or find it in various formats online at

    http://www.gnu.org.ua/software/rush/manual

If any discrepancies occur between this manpage and the Manual, the later shall be considered the authoritative source.

DESCRIPTION
Searches back through the GNU Rush database and displays a list of all user sessions since the database was created.

The utility operates on the default accounting database, which is maintained only if rush(1) runs in accounting mode.

OPTIONS

-F, --format=STRING
    Use STRING instead of the default format. Use STRING instead of the default format. See the section FORMAT, for a detailed discussion of the format syntax. If the STRING begins with a @, then this character is removed from it, and the resulting string is regarded as a name of the file to read. The file is read literally, except that lines beginning with a semicolon are ignored.

-f, --file=DIR
    Look for database files in DIR.

--forward
    Show entries in chronological order.

-H, --no-header
    Do not display header line.

-n, --count=NUMBER
    Show at most NUMBER records.

Other options

-h, --help
    Give this help list.

--usage
    Give a short usage message.

--version
    Print program version.

ENVIRONMENT

RUSHLAST_FORMAT
    When set, supplies a format string to use instead of the built-in format. If the value begins with a @ sign, rest of characters is treated as the name of file to read the format from, similarly to the --format option, which see.

    The precedence rule for format selection is:

    .   The --format option.

    .   The RUSHLAST_FORMAT environment variable.

    .   Built-in format.

FORMATS
The format string supplied with the -F (--format) option controls the output of every record from the GNU Rush accounting database. It consists of the following classes of objects:

Ordinary characters
    These are copied to the output verbatim.

Escapes
    An escape is a backslash, followed by a single character. It is interpreted according to the following table:

    	Sequence	Replaced with
    	\a	Audible bell character (ASCII 7)
    	\b	Backspace character (ASCII 8)
    	\e	Escape character (ASCII 27)
    	\f	Form-feed character (ASCII 12)
    	\n	Newline character (ASCII 10)
    	\r	Carriage return character (ASCII 13)
    	\t	Horizontal tabulation character (ASCII 9)
    	\v	Vertical tabulation character (ASCII 11)
    	\\	A single backslash
    	\"	A double-quote.

    Any escape not listed in the table above results in its second character being output.

Quoted strings
    Strings are delimited by single or double quotes. Within a string escape sequences are interpreted as described above.

Format specifications
    Format specification can be regarded as a kind of function, which outputs a particular piece of information from the database record. Syntactically, format specification starts with an opening brace and ends with a closing brace. The first word after the brace is the name of the specification. The rest of words are positional arguments followed by keyword arguments. Both are optional. A keyword argument begins with a colon.

The available format specifications are:

(newline [COUNT])
    Causes the newline character to be output. If the optional count is supplied, that many newlines will be printed

(tab [COUNT])
    Advance to the next tab stop in the output stream. If optional COUNT is present, then skip that many tab stops. Each tab stop is eight characters long.

The following specifications output particular fields of a database record. They all take two positional arguments: WIDTH and TITLE.

The first argument, WIDTH sets the maximum output length for this specification. If the number of characters actually output is less than the width, they will be padded with whitespace either to the left or to the right, depending on the presence of the :right keyword argument. If the number of characters is greater than WIDTH, they will be truncated to fit. If WIDTH is not given, the exact data are output as is.

The second argument, TITLE, gives the title of this column for the heading line. By default no title is output.

Every field specification accepts at least two keyword arguments. The keyword :right may be used to request alignment to the right for the data. This keyword is ignored if WIDTH is not given.

The keyword :empty followed by a string causes the program to output that string if the resulting value for this specification would otherwise be empty.

(user WIDTH TITLE [:empty REPL][:right])
    Print the user login name.

(start-time WIDTH TITLE [:empty REPL][:right][:format DATE-FORMAT])
    Date and time when the session started. The :format keyword introduces the strftime(3) format string to be used when converting the date for printing. The default value is "%a %H:%M".

(stop-time WIDTH TITLE [:empty REPL][:right][:format DATE-FORMAT])
    Time when the command finished. If it is still running, the word running is output.

(duration WIDTH TITLE [:empty REPL][:right])
    Total time of the session duration.

(rule WIDTH TITLE [:right])
    The tag of the rule that was used to serve the user.

(command WIDTH TITLE [:empty REPL][:right])
    Command line being executed.

(pid WIDTH TITLE [:right])
    PID of the process.

The default format is:

    (user 10 Login)" "
    (rule 8 Rule)" "
    (start-time 0 Start)" "
    (stop-time 0 Stop)" "
    (duration 7 Time)" "
    (command 32 Command)

SEE ALSO
rush(1), rushwho(1).

AUTHORS
Sergey Poznyakoff

BUG REPORTS
Report bugs to <bug-rush@gnu.org.ua>.

COPYRIGHT
Copyright © 2016 Sergey Poznyakoff
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.