From owner-dev-commits-src-all@freebsd.org Sat Jan 9 17:43:54 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6A79B4DDBB8; Sat, 9 Jan 2021 17:43:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DCnQL2crdz3msr; Sat, 9 Jan 2021 17:43:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B13419C61; Sat, 9 Jan 2021 17:43:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 109Hhs6h058279; Sat, 9 Jan 2021 17:43:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 109HhsOx058278; Sat, 9 Jan 2021 17:43:54 GMT (envelope-from git) Date: Sat, 9 Jan 2021 17:43:54 GMT Message-Id: <202101091743.109HhsOx058278@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Fernando Apesteguía Subject: git: 53c8d22495cf - main - last(1): Add EXAMPLES section MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 53c8d22495cf81cf53b5631df860e3d7de00343f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2021 17:43:54 -0000 The branch main has been updated by fernape (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=53c8d22495cf81cf53b5631df860e3d7de00343f commit 53c8d22495cf81cf53b5631df860e3d7de00343f Author: Fernando Apesteguía AuthorDate: 2021-01-09 17:28:23 +0000 Commit: Fernando Apesteguía CommitDate: 2021-01-09 17:37:25 +0000 last(1): Add EXAMPLES section Add two simple examples showing the use of the flags: d, n, s, t While here, reorder cross references properly by section Bump .Dd Approved by: manpages (gbe@) Differential Revision: https://reviews.freebsd.org/D27540 last(1): Bump .Dd --- usr.bin/last/last.1 | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/usr.bin/last/last.1 b/usr.bin/last/last.1 index b819f4f8dbfd..d9442dad75cb 100644 --- a/usr.bin/last/last.1 +++ b/usr.bin/last/last.1 @@ -28,7 +28,7 @@ .\" @(#)last.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd August 28, 2018 +.Dd January 9, 2021 .Dt LAST 1 .Os .Sh NAME @@ -204,13 +204,31 @@ far the search has progressed and then continues. .It Pa /var/log/utx.log login data base .El +.Sh EXAMPLES +Show logins in pts/14 with the duration in seconds and limit the report to +two lines: +.Bd -literal -offset indent +$ last -n2 -s -t pts/14 +bob pts/1 Wed Dec 9 11:08 still logged in +bob pts/2 Mon Dec 7 20:10 - 20:23 ( 776) +.Ed +.Pp +Show active logins at +.Ql December 7th 20:23 +of the current year: +.Bd -literal -offset indent +$ last -d 12072023 +bob pts/1 Mon Dec 7 20:10 - 20:23 (00:12) +bob pts/6 Mon Dec 7 19:24 - 22:27 (03:03) +alice ttyv0 Mon Dec 7 19:18 - 22:27 (03:09) +.Ed .Sh SEE ALSO .Xr lastcomm 1 , .Xr getutxent 3 , -.Xr ac 8 , -.Xr lastlogin 8 , .Xr libxo 3 , -.Xr xo_parse_args 3 +.Xr xo_parse_args 3 , +.Xr ac 8 , +.Xr lastlogin 8 .Sh HISTORY .Nm utility first appeared in