Skip to content

Commit fa2b889

Browse files
authored
Merge pull request #432 from Aggarwalmansi/improve-linux-guides
Improve and standardize Linux command guides: mkdir, column, cmatrix,…
2 parents caad70c + 19252aa commit fa2b889

File tree

4 files changed

+29
-15
lines changed

4 files changed

+29
-15
lines changed

ebook/en/content/035-the-killall-command.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ killall conky
1919
# OR
2020
killall -SIGTERM conky
2121
# OR
22-
kilall -15 conky
22+
killall -15 conky
2323
```
2424

25-
I was able to kill Wine ( which are Windows exe files running on Linux ) applications this way too.
25+
You can also kill Wine processes (Windows executable files running on Linux) this way.
2626

2727
```sh
2828
killall TQ.exe
@@ -108,20 +108,20 @@ killall -V, --version
108108

109109
|**Short Flag** |**Long Flag** |**Description** |
110110
|:---|:---|:---|
111-
|`-e`|`--exact`|require an exact match for very long names|
111+
|`-e`|`--exact`|require an exact match for very long names|
112112
|`-I`|`--ignore-case`|case insensitive process name match|
113113
|`-g`|`--process-group`|kill process group instead of process|
114114
|`-y`|`--younger-than`|kill processes younger than TIME|
115115
|`-o`|`--older-than`|kill processes older than TIME|
116-
|`-i`|`--interactive`|ask for confirmation before killing|
116+
|`-i`|`--interactive`|Prompt before killing processes to avoid accidental termination.|
117117
|`-l`|`--list`|list all known signal names|
118118
|`-q`|`--quiet`|don't print complaints|
119119
|`-r`|`--regexp`|interpret NAME as an extended regular expression|
120120
|`-s`|`--signal SIGNAL`|send this signal instead of SIGTERM|
121121
|`-u`|`--user USER`|kill only process(es) running as USER|
122122
|`-v`|`--verbose`|report if the signal was successfully sent|
123123
|`-w`|`--wait`|wait for processes to die|
124-
|`-n`|`--ns PID`|match processes that belong to the same namespaces as PID
124+
|`-n`|`--ns PID`|Match processes belonging to the same namespace as the specified PID.
125125
|`-Z`|`--context`|REGEXP kill only process(es) having context (must precede other arguments)
126126

127127
### Related commands

ebook/en/content/058-the-reboot-command.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The `reboot` Command
22

3-
The `reboot` command is used to restart a linux system. However, it requires elevated permission using the [sudo](https://github.com/bobbyiliev/101-linux-commands/blob/main/ebook/en/content/051-the-sudo-command.md) command. Necessity to use this command usually arises after significant system or network updates have been made to the system.
3+
The `reboot` command is used to restart a Linux system. However, it requires elevated permission using the [sudo](https://github.com/bobbyiliev/101-linux-commands/blob/main/ebook/en/content/051-the-sudo-command.md) command. Necessity to use this command usually arises after significant system or network updates have been made to the system.
44

55
## Syntax
66
```
@@ -10,7 +10,7 @@ reboot [OPTIONS...]
1010
### Options
1111
- **–help** : This option prints a short help text and exit.
1212
- **-halt** : This command will stop the machine.
13-
- **-w**, **–wtmp-only** : This option only writes wtmp shutdown entry, it do not actually halt, power-off, reboot.
13+
- **-w**, **–wtmp-only** : This option only writes wtmp shutdown entry, it does not actually halt, power-off, reboot.
1414

1515
### Examples
1616
1. Basic Usage. Mainly used to restart without any further details
@@ -22,9 +22,9 @@ However, alternatively the shutdown command with the `-r` option
2222
$ sudo shutdown -r now
2323
```
2424

25-
**Note** 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.
25+
**Note** 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.
2626

27-
2. The `reboot` command has limited usage, and the `shutdown` 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
27+
2. The `reboot` command has limited usage, and the `shutdown` 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
2828
```
2929
$ sudo shutdown –r [TIME] [MESSAGE]
3030
```
@@ -50,7 +50,8 @@ $ sudo shutdown –c [MESSAGE]
5050
$sudo shutdown -c "Scheduled reboot cancelled because the chicken crossed the road"
5151
```
5252

53-
4. Checking your reboot logs
53+
4. Shows a history of system reboots
54+
**Syntax**
5455
```
5556
$ last reboot
5657
```

ebook/en/content/064-the-gunzip-command.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The `gunzip` command is an antonym command of [`gzip` command](015-the-gzip-command.md). In other words, it decompresses files deflated by the `gzip` command.
44

5-
`gunzip` takes a list of files on its command line and replaces each file whose name ends with _.gz_, _-gz_, _.z_, _-z_, or *\_z* (ignoring case) and which begins with the correct magic number with an uncompressed file without the original extension. `gunzip` also recognizes the special extensions *.tgz* and *.taz* as shorthands for *.tar.gz* and *.tar.Z* respectively.
5+
"`gunzip` takes a list of files as arguments. It replaces each file whose name ends with `.gz`, `-gz`, `.z`, `-z`, or `_z` (case-insensitive) and which begins with the correct magic number with an uncompressed file, removing the original extension."
66

77
### Examples:
88

@@ -12,13 +12,13 @@ The `gunzip` command is an antonym command of [`gzip` command](015-the-gzip-comm
1212
gunzip filename.gz
1313
```
1414

15-
2. Recursively uncompress content inside a directory, that match extension (suffix) compressed formats accepted by `gunzip`:
15+
2. "Recursively uncompress all files inside a directory that match the compressed file formats supported by `gunzip`:"
1616

1717
```
1818
gunzip -r directory_name/
1919
```
2020

21-
3. Uncompress all files in the current/working directory whose suffix match *.tgz*:
21+
3. "Uncompress all files in the current working directory whose suffix matches `.tgz`:
2222

2323
```
2424
gunzip -S .tgz *
@@ -54,4 +54,8 @@ gunzip [ -acfhklLnNrtvV ] [-S suffix] [ name ... ]
5454
||--synchronous|synchronous output (safer if system crashes, but slower)|
5555
|-t|--test|test compressed file integrity|
5656
|-v|--verbose|verbose mode|
57-
|-V|--version|display version number|
57+
|-V|--version|display version number|
58+
59+
60+
### **Note: gunzip filename.gz is equivalent to gzip -d filename.gz.
61+
### Warning: Running gunzip without -c deletes the original compressed file by default.

ebook/en/content/162-the-column-command.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,23 @@ mount | column -t
4040
4. Custom Column Separator
4141
```bash
4242
# Format CSV data with custom separator
43-
echo "Name,Age,City\nJohn,25,NYC\nJane,30,LA" | column -t -s,
43+
echo -e "Name,Age,City\nJohn,25,NYC\nJane,30,LA" | column -t -s,
44+
45+
Name Age City
46+
John 25 NYC
47+
Jane 30 LA
48+
4449
```
4550

4651
5. Left-aligned Table
4752
```bash
4853
# Create a left-aligned table from space-separated data
4954
ps aux | head -n 5 | column -t -L
5055
```
56+
> **Note:** Options like `-L` and `-R` may not be available in all Linux distributions (mainly GNU `column`).
57+
58+
# Format a file into columns (e.g., data.txt)
59+
column -t -s, data.txt
5160

5261
## Additional Information
5362
- The `column` command is part of the `util-linux` package

0 commit comments

Comments
 (0)