Date: Sat, 9 Jan 2021 17:43:54 GMT From: Fernando Apesteguía <fernape@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 53c8d22495cf - main - last(1): Add EXAMPLES section Message-ID: <202101091743.109HhsOx058278@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <fernape@FreeBSD.org> AuthorDate: 2021-01-09 17:28:23 +0000 Commit: Fernando Apesteguía <fernape@FreeBSD.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101091743.109HhsOx058278>