From db6e0240c4f21fff6b559a40260883f782ee686b Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 24 Oct 2018 21:59:30 -0400 Subject: [PATCH 1/6] Created uptime.md file in /basics/ directory --- _commands/basics/uptime.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 _commands/basics/uptime.md diff --git a/_commands/basics/uptime.md b/_commands/basics/uptime.md new file mode 100644 index 000000000..0f399ec38 --- /dev/null +++ b/_commands/basics/uptime.md @@ -0,0 +1,25 @@ +--- +--- + +uptime +------- + +`uptime` tells you how long your system has been up and running. + +~~~ bash +$ uptime +21:57:05 up 10:09, 1 user, load average: 0.23, 0.35, 1.06 +~~~ + + + +### Useful Options / Examples + +#### Example command + +##### Break it down + +#### Example command + +##### Break it down + From 15f9ee1383848665159bcfc0423ea1454be19143 Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 24 Oct 2018 22:06:01 -0400 Subject: [PATCH 2/6] Added description of output --- _commands/basics/uptime.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/_commands/basics/uptime.md b/_commands/basics/uptime.md index 0f399ec38..4e3869a86 100644 --- a/_commands/basics/uptime.md +++ b/_commands/basics/uptime.md @@ -15,7 +15,16 @@ $ uptime ### Useful Options / Examples -#### Example command +#### Description of Output +`uptime` displays the following information in one line when it is ran: + +* The current time +* How long the system has been up +* The number of users on the system +* The system load average in + * The past 1 minute + * The past 5 minutes, and + * The past 15 minutes ##### Break it down From 392e62674995a041cc69aeaf0a2a5ddf8b21ccce Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 24 Oct 2018 22:14:28 -0400 Subject: [PATCH 3/6] Added example usage of uptime -p --- _commands/basics/uptime.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/_commands/basics/uptime.md b/_commands/basics/uptime.md index 4e3869a86..f5681eda3 100644 --- a/_commands/basics/uptime.md +++ b/_commands/basics/uptime.md @@ -19,16 +19,18 @@ $ uptime `uptime` displays the following information in one line when it is ran: * The current time -* How long the system has been up +* How long the system has been up (the 'up time') * The number of users on the system * The system load average in * The past 1 minute * The past 5 minutes, and * The past 15 minutes -##### Break it down - -#### Example command +#### `uptime -p` +Prints the uptime in a nicer, **p**rettier format +~~~ bash +$ uptime -p +up 10 hours, 25 minutes +~~~ -##### Break it down From 8cf6851a8aab2cf4eef704acdbd9b7a0c91750b3 Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 24 Oct 2018 22:25:37 -0400 Subject: [PATCH 4/6] Added documentation for the -V and -h flags --- _commands/basics/uptime.md | 39 +++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/_commands/basics/uptime.md b/_commands/basics/uptime.md index f5681eda3..1bd3db5e2 100644 --- a/_commands/basics/uptime.md +++ b/_commands/basics/uptime.md @@ -4,7 +4,7 @@ uptime ------- -`uptime` tells you how long your system has been up and running. +`uptime` prints out how long your system has been up and running. ~~~ bash $ uptime @@ -15,7 +15,7 @@ $ uptime ### Useful Options / Examples -#### Description of Output +#### **Description of Output** `uptime` displays the following information in one line when it is ran: * The current time @@ -26,11 +26,44 @@ $ uptime * The past 5 minutes, and * The past 15 minutes -#### `uptime -p` + +#### **`uptime -p`** Prints the uptime in a nicer, **p**rettier format + ~~~ bash $ uptime -p up 10 hours, 25 minutes ~~~ +#### **`uptime -s`** +Displays the uptime **s**ince, in yyyy-mm-dd HH:MM:SS format + +~~~ bash +$ uptime -s +2018-10-24 11:47:53 +~~~ + +#### **`uptime -V`** +Displays your **V**ersion of uptime + +~~~ bash +$ uptime -V +uptime from procps-ng 3.3.12 +~~~ + +#### **`uptime -h`** +Displays a short summary of this page + +~~~ bash +$ uptime -h + +Usage: + uptime [options] + +Options: + -p, --pretty show uptime in pretty format + -h, --help display this help and exit + -s, --since system up since + -V, --version output version information and exit +~~~ From c65b5c369f480dc20fcf8e218b1a3ea04b0aecc3 Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 24 Oct 2018 22:35:14 -0400 Subject: [PATCH 5/6] Finished formatting page --- _commands/basics/uptime.md | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/_commands/basics/uptime.md b/_commands/basics/uptime.md index 1bd3db5e2..ceed8af83 100644 --- a/_commands/basics/uptime.md +++ b/_commands/basics/uptime.md @@ -15,7 +15,7 @@ $ uptime ### Useful Options / Examples -#### **Description of Output** +#### Description of Output `uptime` displays the following information in one line when it is ran: * The current time @@ -27,8 +27,10 @@ $ uptime * The past 15 minutes -#### **`uptime -p`** -Prints the uptime in a nicer, **p**rettier format +### `uptime -p` +Prints the uptime in a nicer, **p**rettier format. + +`uptime --pretty` can also be used. ~~~ bash $ uptime -p @@ -36,24 +38,30 @@ up 10 hours, 25 minutes ~~~ -#### **`uptime -s`** -Displays the uptime **s**ince, in yyyy-mm-dd HH:MM:SS format +### `uptime -s` +Displays the uptime **s**ince, in yyyy-mm-dd HH:MM:SS format. + +`uptime --since` can also be used. ~~~ bash $ uptime -s 2018-10-24 11:47:53 ~~~ -#### **`uptime -V`** -Displays your **V**ersion of uptime +### `uptime -V` +Displays your **V**ersion of uptime. + +`uptime --version` can also be used. ~~~ bash $ uptime -V uptime from procps-ng 3.3.12 ~~~ -#### **`uptime -h`** -Displays a short summary of this page +### `uptime -h` +Displays a short **h**elp page, similar to this page. + +`uptime --help` can also be used. ~~~ bash $ uptime -h From dcf787586597126c6cee80713c7f1fa1582b66df Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 24 Oct 2018 22:39:27 -0400 Subject: [PATCH 6/6] Ready to upload --- _commands/basics/uptime.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_commands/basics/uptime.md b/_commands/basics/uptime.md index ceed8af83..f9faebc6c 100644 --- a/_commands/basics/uptime.md +++ b/_commands/basics/uptime.md @@ -13,6 +13,7 @@ $ uptime + ### Useful Options / Examples #### Description of Output @@ -28,7 +29,7 @@ $ uptime ### `uptime -p` -Prints the uptime in a nicer, **p**rettier format. +Displays the uptime in a nicer, **p**rettier format. `uptime --pretty` can also be used.