From 3b98a789995f6541e7eaff728cadc992e08e68d8 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Sat, 23 May 2020 08:43:25 +0200 Subject: [PATCH] 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 --- sys-utils/unshare.1 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 -- 2.47.2