From: Michael Kerrisk Date: Sat, 23 May 2020 06:43:25 +0000 (+0200) Subject: Manual pages: unshare.1: fix examples, part 3 X-Git-Tag: v2.36-rc1~60 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3b98a789995f6541e7eaff728cadc992e08e68d8;p=thirdparty%2Futil-linux.git Manual pages: unshare.1: fix examples, part 3 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 --- diff --git a/sys-utils/unshare.1 b/sys-utils/unshare.1 index 38f7a62cfd..679f93715a 100644 --- a/sys-utils/unshare.1 +++ b/sys-utils/unshare.1 @@ -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