Date: Mon, 5 Oct 2020 13:46:19 +0000 (UTC) From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= <fernape@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366446 - head/bin/hostname Message-ID: <202010051346.095DkJ4Z026657@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: fernape (ports committer) Date: Mon Oct 5 13:46:19 2020 New Revision: 366446 URL: https://svnweb.freebsd.org/changeset/base/366446 Log: hostname(1): Add EXAMPLES to man page Add a very simple set of examples Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D26663 Modified: head/bin/hostname/hostname.1 Modified: head/bin/hostname/hostname.1 ============================================================================== --- head/bin/hostname/hostname.1 Mon Oct 5 13:39:37 2020 (r366445) +++ head/bin/hostname/hostname.1 Mon Oct 5 13:46:19 2020 (r366446) @@ -29,7 +29,7 @@ .\" @(#)hostname.1 8.2 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd November 10, 2016 +.Dd October 5, 2020 .Dt HOSTNAME 1 .Os .Sh NAME @@ -66,6 +66,25 @@ name. .It Fl d Only print domain information. .El +.Sh EXAMPLES +Set the host name of the machine and check the result: +.Bd -literal -offset indent +$ hostname beastie.localdomain.org +$ hostname +beastie.localdomain.org +.Ed +.Pp +Do not show domain information: +.Bd -literal -offset indent +$ hostname -s +beastie +.Ed +.Pp +Show only domain information: +.Bd -literal -offset indent +$ hostname -d +localdomain.org +.Ed .Sh SEE ALSO .Xr gethostname 3 , .Xr rc.conf 5
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010051346.095DkJ4Z026657>