Skip to content

Commit 5b28c99

Browse files
committed
🤖 Auto-update eBook files and GitHub Pages [skip ci]
1 parent fa2b889 commit 5b28c99

File tree

7 files changed

+54
-28
lines changed

7 files changed

+54
-28
lines changed
1.78 KB
Binary file not shown.
1.74 KB
Binary file not shown.
169 Bytes
Binary file not shown.

ebook/en/export/101-linux-commands.html

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4564,9 +4564,9 @@ <h3>Examples:</h3>
45644564
<span class="hljs-comment"># OR</span>
45654565
killall -SIGTERM conky
45664566
<span class="hljs-comment"># OR</span>
4567-
kilall -15 conky
4567+
killall -15 conky
45684568
</code></pre>
4569-
<p>I was able to kill Wine ( which are Windows exe files running on Linux ) applications this way too.</p>
4569+
<p>You can also kill Wine processes (Windows executable files running on Linux) this way.</p>
45704570
<pre><code class="language-sh hljs bash" data-lang="sh">killall TQ.exe
45714571
</code></pre>
45724572
<ol start="2">
@@ -4648,7 +4648,7 @@ <h3>Additional Flags and their Functionalities:</h3>
46484648
<tr>
46494649
<td align="left"><code>-e</code></td>
46504650
<td align="left"><code>--exact</code></td>
4651-
<td align="left">require an exact match for very long names</td>
4651+
<td align="left">require an exact match for very long names</td>
46524652
</tr>
46534653
<tr>
46544654
<td align="left"><code>-I</code></td>
@@ -4673,7 +4673,7 @@ <h3>Additional Flags and their Functionalities:</h3>
46734673
<tr>
46744674
<td align="left"><code>-i</code></td>
46754675
<td align="left"><code>--interactive</code></td>
4676-
<td align="left">ask for confirmation before killing</td>
4676+
<td align="left">Prompt before killing processes to avoid accidental termination.</td>
46774677
</tr>
46784678
<tr>
46794679
<td align="left"><code>-l</code></td>
@@ -4713,7 +4713,7 @@ <h3>Additional Flags and their Functionalities:</h3>
47134713
<tr>
47144714
<td align="left"><code>-n</code></td>
47154715
<td align="left"><code>--ns PID</code></td>
4716-
<td align="left">match processes that belong to the same namespaces as PID</td>
4716+
<td align="left">Match processes belonging to the same namespace as the specified PID.</td>
47174717
</tr>
47184718
<tr>
47194719
<td align="left"><code>-Z</code></td>
@@ -6780,15 +6780,15 @@ <h3>Additional Flags and their Functionalities:</h3>
67806780
</tbody>
67816781
</table>
67826782
<div style="page-break-after: always;"></div><h1>The <code>reboot</code> Command</h1>
6783-
<p>The <code>reboot</code> command is used to restart a linux system. However, it requires elevated permission using the <a href="https://github.com/bobbyiliev/101-linux-commands/blob/main/ebook/en/content/051-the-sudo-command.md">sudo</a> command. Necessity to use this command usually arises after significant system or network updates have been made to the system.</p>
6783+
<p>The <code>reboot</code> command is used to restart a Linux system. However, it requires elevated permission using the <a href="https://github.com/bobbyiliev/101-linux-commands/blob/main/ebook/en/content/051-the-sudo-command.md">sudo</a> command. Necessity to use this command usually arises after significant system or network updates have been made to the system.</p>
67846784
<h2>Syntax</h2>
67856785
<pre><code class="language- hljs " data-lang="">reboot [OPTIONS...]
67866786
</code></pre>
67876787
<h3>Options</h3>
67886788
<ul>
67896789
<li><strong>–help</strong> : This option prints a short help text and exit.</li>
67906790
<li><strong>-halt</strong> : This command will stop the machine.</li>
6791-
<li><strong>-w</strong>, <strong>–wtmp-only</strong> : This option only writes wtmp shutdown entry, it do not actually halt, power-off, reboot.</li>
6791+
<li><strong>-w</strong>, <strong>–wtmp-only</strong> : This option only writes wtmp shutdown entry, it does not actually halt, power-off, reboot.</li>
67926792
</ul>
67936793
<h3>Examples</h3>
67946794
<ol>
@@ -6799,9 +6799,9 @@ <h3>Examples</h3>
67996799
<p>However, alternatively the shutdown command with the <code>-r</code> option</p>
68006800
<pre><code class="language- hljs " data-lang="">$ sudo shutdown -r now
68016801
</code></pre>
6802-
<p><strong>Note</strong> that the usage of the reboot, halt and power off is almost similar in syntax and effect. Run each of these commands with –help to see the details.</p>
6802+
<p><strong>Note</strong> that the usage of the reboot, halt and power off is almost similar in syntax and effect. Run each of these commands with –-help to see the details.</p>
68036803
<ol start="2">
6804-
<li>The <code>reboot</code> command has limited usage, and the <code>shutdown</code> command is being used instead of reboot command to fulfill much more advance reboot and shutdown requirements. One of those situations is a scheduled restart. Syntax is as follows</li>
6804+
<li>The <code>reboot</code> command has limited usage, and the <code>shutdown</code> command is being used instead of reboot command to fulfill much more advanced reboot and shutdown requirements. One of those situations is a scheduled restart. Syntax is as follows</li>
68056805
</ol>
68066806
<pre><code class="language- hljs " data-lang="">$ sudo shutdown –r [TIME] [MESSAGE]
68076807
</code></pre>
@@ -6822,7 +6822,8 @@ <h3>Examples</h3>
68226822
<pre><code class="language-php hljs php" data-lang="php">$sudo shutdown -c <span class="hljs-string">"Scheduled reboot cancelled because the chicken crossed the road"</span>
68236823
</code></pre>
68246824
<ol start="4">
6825-
<li>Checking your reboot logs</li>
6825+
<li>Shows a history of system reboots
6826+
<strong>Syntax</strong></li>
68266827
</ol>
68276828
<pre><code class="language- hljs " data-lang="">$ last reboot
68286829
</code></pre>
@@ -7212,20 +7213,20 @@ <h3>Additional Flags and their Functionalities:</h3>
72127213
</table>
72137214
<div style="page-break-after: always;"></div><h1>The <code>gunzip</code> command</h1>
72147215
<p>The <code>gunzip</code> command is an antonym command of <a href="015-the-gzip-command.md"><code>gzip</code> command</a>. In other words, it decompresses files deflated by the <code>gzip</code> command.</p>
7215-
<p><code>gunzip</code> takes a list of files on its command line and replaces each file whose name ends with <em>.gz</em>, <em>-gz</em>, <em>.z</em>, <em>-z</em>, or <em>_z</em> (ignoring case) and which begins with the correct magic number with an uncompressed file without the original extension. <code>gunzip</code> also recognizes the special extensions <em>.tgz</em> and <em>.taz</em> as shorthands for <em>.tar.gz</em> and <em>.tar.Z</em> respectively.</p>
7216+
<p>&quot;<code>gunzip</code> takes a list of files as arguments. It replaces each file whose name ends with <code>.gz</code>, <code>-gz</code>, <code>.z</code>, <code>-z</code>, or <code>_z</code> (case-insensitive) and which begins with the correct magic number with an uncompressed file, removing the original extension.&quot;</p>
72167217
<h3>Examples:</h3>
72177218
<ol>
72187219
<li>Uncompress a file</li>
72197220
</ol>
72207221
<pre><code class="language- hljs " data-lang="">gunzip filename.gz
72217222
</code></pre>
72227223
<ol start="2">
7223-
<li>Recursively uncompress content inside a directory, that match extension (suffix) compressed formats accepted by <code>gunzip</code>:</li>
7224+
<li>&quot;Recursively uncompress all files inside a directory that match the compressed file formats supported by <code>gunzip</code>:&quot;</li>
72247225
</ol>
72257226
<pre><code class="language- hljs " data-lang="">gunzip -r directory_name/
72267227
</code></pre>
72277228
<ol start="3">
7228-
<li>Uncompress all files in the current/working directory whose suffix match <em>.tgz</em>:</li>
7229+
<li>&quot;Uncompress all files in the current working directory whose suffix matches <code>.tgz</code>:</li>
72297230
</ol>
72307231
<pre><code class="language- hljs " data-lang="">gunzip -S .tgz *
72317232
</code></pre>
@@ -7306,6 +7307,8 @@ <h3>Additional Flags and their Functionalities:</h3>
73067307
</tr>
73077308
</tbody>
73087309
</table>
7310+
<h3>**Note: gunzip filename.gz is equivalent to gzip -d filename.gz.</h3>
7311+
<h3>Warning: Running gunzip without -c deletes the original compressed file by default.</h3>
73097312
<div style="page-break-after: always;"></div><h1>The <code>hostnamectl</code> command</h1>
73107313
<p>The <code>hostnamectl</code> command provides a proper API used to control Linux system hostname and change its related settings. The command also helps to change the hostname without actually locating and editing the <code>/etc/hostname</code> file on a given system.</p>
73117314
<h2>Syntax</h2>
@@ -21325,14 +21328,24 @@ <h2>Examples</h2>
2132521328
<li>Custom Column Separator</li>
2132621329
</ol>
2132721330
<pre><code class="language-bash hljs bash" data-lang="bash"><span class="hljs-comment"># Format CSV data with custom separator</span>
21328-
<span class="hljs-built_in">echo</span> <span class="hljs-string">"Name,Age,City\nJohn,25,NYC\nJane,30,LA"</span> | column -t -s,
21331+
<span class="hljs-built_in">echo</span> -e <span class="hljs-string">"Name,Age,City\nJohn,25,NYC\nJane,30,LA"</span> | column -t -s,
21332+
21333+
Name Age City
21334+
John 25 NYC
21335+
Jane 30 LA
21336+
2132921337
</code></pre>
2133021338
<ol start="5">
2133121339
<li>Left-aligned Table</li>
2133221340
</ol>
2133321341
<pre><code class="language-bash hljs bash" data-lang="bash"><span class="hljs-comment"># Create a left-aligned table from space-separated data</span>
2133421342
ps aux | head -n 5 | column -t -L
2133521343
</code></pre>
21344+
<blockquote>
21345+
<p><strong>Note:</strong> Options like <code>-L</code> and <code>-R</code> may not be available in all Linux distributions (mainly GNU <code>column</code>).</p>
21346+
</blockquote>
21347+
<div style="page-break-after: always;"></div><h1>Format a file into columns (e.g., data.txt)</h1>
21348+
<p>column -t -s, data.txt</p>
2133621349
<h2>Additional Information</h2>
2133721350
<ul>
2133821351
<li>The <code>column</code> command is part of the <code>util-linux</code> package</li>
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

index.html

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4564,9 +4564,9 @@ <h3>Examples:</h3>
45644564
<span class="hljs-comment"># OR</span>
45654565
killall -SIGTERM conky
45664566
<span class="hljs-comment"># OR</span>
4567-
kilall -15 conky
4567+
killall -15 conky
45684568
</code></pre>
4569-
<p>I was able to kill Wine ( which are Windows exe files running on Linux ) applications this way too.</p>
4569+
<p>You can also kill Wine processes (Windows executable files running on Linux) this way.</p>
45704570
<pre><code class="language-sh hljs bash" data-lang="sh">killall TQ.exe
45714571
</code></pre>
45724572
<ol start="2">
@@ -4648,7 +4648,7 @@ <h3>Additional Flags and their Functionalities:</h3>
46484648
<tr>
46494649
<td align="left"><code>-e</code></td>
46504650
<td align="left"><code>--exact</code></td>
4651-
<td align="left">require an exact match for very long names</td>
4651+
<td align="left">require an exact match for very long names</td>
46524652
</tr>
46534653
<tr>
46544654
<td align="left"><code>-I</code></td>
@@ -4673,7 +4673,7 @@ <h3>Additional Flags and their Functionalities:</h3>
46734673
<tr>
46744674
<td align="left"><code>-i</code></td>
46754675
<td align="left"><code>--interactive</code></td>
4676-
<td align="left">ask for confirmation before killing</td>
4676+
<td align="left">Prompt before killing processes to avoid accidental termination.</td>
46774677
</tr>
46784678
<tr>
46794679
<td align="left"><code>-l</code></td>
@@ -4713,7 +4713,7 @@ <h3>Additional Flags and their Functionalities:</h3>
47134713
<tr>
47144714
<td align="left"><code>-n</code></td>
47154715
<td align="left"><code>--ns PID</code></td>
4716-
<td align="left">match processes that belong to the same namespaces as PID</td>
4716+
<td align="left">Match processes belonging to the same namespace as the specified PID.</td>
47174717
</tr>
47184718
<tr>
47194719
<td align="left"><code>-Z</code></td>
@@ -6780,15 +6780,15 @@ <h3>Additional Flags and their Functionalities:</h3>
67806780
</tbody>
67816781
</table>
67826782
<div style="page-break-after: always;"></div><h1>The <code>reboot</code> Command</h1>
6783-
<p>The <code>reboot</code> command is used to restart a linux system. However, it requires elevated permission using the <a href="https://github.com/bobbyiliev/101-linux-commands/blob/main/ebook/en/content/051-the-sudo-command.md">sudo</a> command. Necessity to use this command usually arises after significant system or network updates have been made to the system.</p>
6783+
<p>The <code>reboot</code> command is used to restart a Linux system. However, it requires elevated permission using the <a href="https://github.com/bobbyiliev/101-linux-commands/blob/main/ebook/en/content/051-the-sudo-command.md">sudo</a> command. Necessity to use this command usually arises after significant system or network updates have been made to the system.</p>
67846784
<h2>Syntax</h2>
67856785
<pre><code class="language- hljs " data-lang="">reboot [OPTIONS...]
67866786
</code></pre>
67876787
<h3>Options</h3>
67886788
<ul>
67896789
<li><strong>–help</strong> : This option prints a short help text and exit.</li>
67906790
<li><strong>-halt</strong> : This command will stop the machine.</li>
6791-
<li><strong>-w</strong>, <strong>–wtmp-only</strong> : This option only writes wtmp shutdown entry, it do not actually halt, power-off, reboot.</li>
6791+
<li><strong>-w</strong>, <strong>–wtmp-only</strong> : This option only writes wtmp shutdown entry, it does not actually halt, power-off, reboot.</li>
67926792
</ul>
67936793
<h3>Examples</h3>
67946794
<ol>
@@ -6799,9 +6799,9 @@ <h3>Examples</h3>
67996799
<p>However, alternatively the shutdown command with the <code>-r</code> option</p>
68006800
<pre><code class="language- hljs " data-lang="">$ sudo shutdown -r now
68016801
</code></pre>
6802-
<p><strong>Note</strong> that the usage of the reboot, halt and power off is almost similar in syntax and effect. Run each of these commands with –help to see the details.</p>
6802+
<p><strong>Note</strong> that the usage of the reboot, halt and power off is almost similar in syntax and effect. Run each of these commands with –-help to see the details.</p>
68036803
<ol start="2">
6804-
<li>The <code>reboot</code> command has limited usage, and the <code>shutdown</code> command is being used instead of reboot command to fulfill much more advance reboot and shutdown requirements. One of those situations is a scheduled restart. Syntax is as follows</li>
6804+
<li>The <code>reboot</code> command has limited usage, and the <code>shutdown</code> command is being used instead of reboot command to fulfill much more advanced reboot and shutdown requirements. One of those situations is a scheduled restart. Syntax is as follows</li>
68056805
</ol>
68066806
<pre><code class="language- hljs " data-lang="">$ sudo shutdown –r [TIME] [MESSAGE]
68076807
</code></pre>
@@ -6822,7 +6822,8 @@ <h3>Examples</h3>
68226822
<pre><code class="language-php hljs php" data-lang="php">$sudo shutdown -c <span class="hljs-string">"Scheduled reboot cancelled because the chicken crossed the road"</span>
68236823
</code></pre>
68246824
<ol start="4">
6825-
<li>Checking your reboot logs</li>
6825+
<li>Shows a history of system reboots
6826+
<strong>Syntax</strong></li>
68266827
</ol>
68276828
<pre><code class="language- hljs " data-lang="">$ last reboot
68286829
</code></pre>
@@ -7212,20 +7213,20 @@ <h3>Additional Flags and their Functionalities:</h3>
72127213
</table>
72137214
<div style="page-break-after: always;"></div><h1>The <code>gunzip</code> command</h1>
72147215
<p>The <code>gunzip</code> command is an antonym command of <a href="015-the-gzip-command.md"><code>gzip</code> command</a>. In other words, it decompresses files deflated by the <code>gzip</code> command.</p>
7215-
<p><code>gunzip</code> takes a list of files on its command line and replaces each file whose name ends with <em>.gz</em>, <em>-gz</em>, <em>.z</em>, <em>-z</em>, or <em>_z</em> (ignoring case) and which begins with the correct magic number with an uncompressed file without the original extension. <code>gunzip</code> also recognizes the special extensions <em>.tgz</em> and <em>.taz</em> as shorthands for <em>.tar.gz</em> and <em>.tar.Z</em> respectively.</p>
7216+
<p>&quot;<code>gunzip</code> takes a list of files as arguments. It replaces each file whose name ends with <code>.gz</code>, <code>-gz</code>, <code>.z</code>, <code>-z</code>, or <code>_z</code> (case-insensitive) and which begins with the correct magic number with an uncompressed file, removing the original extension.&quot;</p>
72167217
<h3>Examples:</h3>
72177218
<ol>
72187219
<li>Uncompress a file</li>
72197220
</ol>
72207221
<pre><code class="language- hljs " data-lang="">gunzip filename.gz
72217222
</code></pre>
72227223
<ol start="2">
7223-
<li>Recursively uncompress content inside a directory, that match extension (suffix) compressed formats accepted by <code>gunzip</code>:</li>
7224+
<li>&quot;Recursively uncompress all files inside a directory that match the compressed file formats supported by <code>gunzip</code>:&quot;</li>
72247225
</ol>
72257226
<pre><code class="language- hljs " data-lang="">gunzip -r directory_name/
72267227
</code></pre>
72277228
<ol start="3">
7228-
<li>Uncompress all files in the current/working directory whose suffix match <em>.tgz</em>:</li>
7229+
<li>&quot;Uncompress all files in the current working directory whose suffix matches <code>.tgz</code>:</li>
72297230
</ol>
72307231
<pre><code class="language- hljs " data-lang="">gunzip -S .tgz *
72317232
</code></pre>
@@ -7306,6 +7307,8 @@ <h3>Additional Flags and their Functionalities:</h3>
73067307
</tr>
73077308
</tbody>
73087309
</table>
7310+
<h3>**Note: gunzip filename.gz is equivalent to gzip -d filename.gz.</h3>
7311+
<h3>Warning: Running gunzip without -c deletes the original compressed file by default.</h3>
73097312
<div style="page-break-after: always;"></div><h1>The <code>hostnamectl</code> command</h1>
73107313
<p>The <code>hostnamectl</code> command provides a proper API used to control Linux system hostname and change its related settings. The command also helps to change the hostname without actually locating and editing the <code>/etc/hostname</code> file on a given system.</p>
73117314
<h2>Syntax</h2>
@@ -21325,14 +21328,24 @@ <h2>Examples</h2>
2132521328
<li>Custom Column Separator</li>
2132621329
</ol>
2132721330
<pre><code class="language-bash hljs bash" data-lang="bash"><span class="hljs-comment"># Format CSV data with custom separator</span>
21328-
<span class="hljs-built_in">echo</span> <span class="hljs-string">"Name,Age,City\nJohn,25,NYC\nJane,30,LA"</span> | column -t -s,
21331+
<span class="hljs-built_in">echo</span> -e <span class="hljs-string">"Name,Age,City\nJohn,25,NYC\nJane,30,LA"</span> | column -t -s,
21332+
21333+
Name Age City
21334+
John 25 NYC
21335+
Jane 30 LA
21336+
2132921337
</code></pre>
2133021338
<ol start="5">
2133121339
<li>Left-aligned Table</li>
2133221340
</ol>
2133321341
<pre><code class="language-bash hljs bash" data-lang="bash"><span class="hljs-comment"># Create a left-aligned table from space-separated data</span>
2133421342
ps aux | head -n 5 | column -t -L
2133521343
</code></pre>
21344+
<blockquote>
21345+
<p><strong>Note:</strong> Options like <code>-L</code> and <code>-R</code> may not be available in all Linux distributions (mainly GNU <code>column</code>).</p>
21346+
</blockquote>
21347+
<div style="page-break-after: always;"></div><h1>Format a file into columns (e.g., data.txt)</h1>
21348+
<p>column -t -s, data.txt</p>
2133621349
<h2>Additional Information</h2>
2133721350
<ul>
2133821351
<li>The <code>column</code> command is part of the <code>util-linux</code> package</li>

0 commit comments

Comments
 (0)