]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Manual pages: unshare.1: fix examples, part 3
authorMichael Kerrisk <mtk.manpages@gmail.com>
Sat, 23 May 2020 06:43:25 +0000 (08:43 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 25 May 2020 12:16:45 +0000 (14:16 +0200)
The time namespaces example had no explanatory text!  Add some.
Also, use the "uptime -p" option for output that is more compact
(and perhaps more readable).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
sys-utils/unshare.1

index 38f7a62cfd623966a3b7c93f5b2775dea4813d76..679f93715a9df3b9f43e265f09a267daec3b16de 100644 (file)
@@ -372,10 +372,17 @@ terminates, the processes in the PID namespace are not killed:
 .EE
 .in
 .PP
+The following example demonstrates the creation of a time namespace
+where the boottime clock is set to a point several years in the past:
+.PP
 .in +4n
 .EX
-.B # unshare \-\-fork \-\-time \-\-boottime 100000000 uptime
- 10:58:48 up 1158 days,  6:05,  1 user,  load average: 0.00, 0.00, 0.00
+.BR "# uptime \-p             " "# Show uptime in initial time namespace"
+up 21 hours, 30 minutes
+.B # unshare \-\-time \-\-fork \-\-boottime 300000000 uptime \-p
+up 9 years, 28 weeks, 1 day, 2 hours, 50 minutes
+.EE
+.in
 .SH AUTHORS
 .UR dottedmag@dottedmag.net
 Mikhail Gusarov