logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

rushlast - show listing of last Rush logins

Authors

       Sergey Poznyakoff

Bug Reports

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

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.

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:

              1.     The --format option.

              2.     The RUSHLAST_FORMAT environment variable.

              3.     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:

       Ordinarycharacters
              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:

                      SequenceReplacedwith
                      \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.

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

       Formatspecifications
              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 positionalarguments followed by keywordarguments.  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.

       (userWIDTHTITLE [:emptyREPL][:right])
              Print the user login name.

       (start-timeWIDTHTITLE [:emptyREPL][:right][:formatDATE-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-timeWIDTHTITLE [:emptyREPL][:right][:formatDATE-FORMAT])
              Time when the command finished.  If it is still running, the word running is output.

       (durationWIDTHTITLE [:emptyREPL][:right])
              Total time of the session duration.

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

       (commandWIDTHTITLE [:emptyREPL][:right])
              Command line being executed.

       (pidWIDTHTITLE [: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)

Name

       rushlast - show listing of last Rush logins

Note

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

           inforushlast

       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.

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.

See Also

rush(1), rushwho(1).

Synopsis

rushlast  [-Hh]  [-FSTRING]  [-fDIR]  [-nNUMBER] [--file=DIR] [--format=STRING] [--forward] [--help]
       [--no-header] [--number=NUMBER] [--usage] [--version] [USER...]

See Also