Skip to content

Commit 65ab842

Browse files
committed
updating format of important points
1 parent 398f9ce commit 65ab842

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

docs/books/admin_guide/03-commands.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ The `clear` command clears the contents of the terminal screen. In fact, to be m
270270

271271
In a terminal, the display will be permanently hidden, whereas in a graphical interface, a scrollbar will allow you to go back in the history of the virtual terminal.
272272

273-
💡 tip
273+
💡 **Tip:**
274274
<kbd>CTRL</kbd> + <kbd>L</kbd> will have the same effect as the `clear` command
275275

276276
### `echo` command
@@ -312,7 +312,7 @@ $ date -d 20210517 +%j
312312

313313
In this last example, the `-d` option displays a given date. The `+%j` option formats this date to show only the day of the year.
314314

315-
💡 Warning
315+
💡 **Warning:**
316316
The format of a date can change depending on the value of the language defined in the environment variable `$LANG`.
317317

318318
The date display can follow the following formats:
@@ -497,7 +497,7 @@ $ ls -lia /home
497497
| `25 oct. 08:10` | Last modified date. |
498498
| `rockstar` | The name of the file (or directory). |
499499

500-
💡 Note
500+
💡 **Note:**
501501
**Aliases** are frequently positioned in common distributions.
502502

503503
This is the case of the alias `ll`:
@@ -604,7 +604,7 @@ $ mkdir /home/rockstar/work
604604
The "rockstar" directory must exist to create the "work" directory.
605605
Otherwise, the `-p` option should be used. The `-p` option creates the parent directories if they do not exist.
606606

607-
💡 Danger
607+
💡 **Danger:**
608608
It is not recommended to use Linux command names as directory or file names.
609609

610610
### `touch` command
@@ -627,7 +627,7 @@ $ touch /home/rockstar/myfile
627627

628628
Date format: `[AAAA]MMJJhhmm[ss]`
629629

630-
💡 Tip
630+
💡 **Tip:**
631631
The `touch` command is primarily used to create an empty file, but it can be useful for incremental or differential backups for example. Indeed, the only effect of executing a `touch` on a file will be to force it to be saved during the next backup.
632632

633633
### `rmdir` command
@@ -644,7 +644,7 @@ $ rmdir /home/rockstar/work
644644
| ----------------------------------------------------------------------- | ----------- |
645645
| `-p` | Removes the parent directory or directories provided if they are empty. |
646646

647-
💡 Tip
647+
💡 **Tip:**
648648
To delete both a non-empty directory and its contents, use the `rm` command.
649649

650650
### `rm` command
@@ -655,7 +655,7 @@ The `rm` command deletes a file or directory.
655655
rm [-f] [-r] file [file] [...]
656656
```
657657

658-
💡 Danger
658+
💡 **Danger:**
659659
Any deletion of a file or directory is final.
660660

661661
| Options | Information |
@@ -664,7 +664,7 @@ rm [-f] [-r] file [file] [...]
664664
| `-i` | Requires confirmation of deletion. |
665665
| `-r` | Recursively deletes subdirectories. |
666666

667-
💡 Note
667+
💡 **Note:**
668668
The `rm` command itself does not ask for confirmation when deleting files. However, with a RedHat/Rocky distribution, `rm` does ask for confirmation of deletion because the `rm` command is an `alias` of the `rm -i` command. Don't be surprised if on another distribution, like Debian for example, you don't get a confirmation request.
669669

670670
Deleting a folder with the `rm` command, whether the folder is empty or not, will require the `-r` option to be added.
@@ -1117,7 +1117,7 @@ $ find /tmp -name *.txt -exec rm -f {} \;
11171117
The previous command searches for all files in the `/tmp` directory named `*.txt` and deletes them.
11181118
11191119
1120-
💡 Tip "Understand the `-exec` option"
1120+
💡 **Tip:** "Understand the `-exec` option"
11211121
In the example above, the `find` command will construct a string representing the command to be executed.
11221122
11231123
If the `find` command finds three files named `log1.txt`, `log2.txt`, and `log3.txt`, then the `find` command will construct the string by replacing in the string `rm -f {} \;` the braces with one of the results of the search, and do this as many times as there are results.
@@ -1130,7 +1130,7 @@ The previous command searches for all files in the `/tmp` directory named `*.txt
11301130
11311131
The `;` character is a special shell character that must be protected by a `\` to prevent it from being interpreted too early by the `find` command (and not in the `-exec`).
11321132
1133-
💡 Tip
1133+
💡 **Tip:**
11341134
`$ find /tmp -name *.txt -delete` does the same thing.
11351135
11361136
### `whereis` command
@@ -1183,7 +1183,7 @@ The `grep` command returns the complete line containing the string you are looki
11831183
$ grep -w "^root" /etc/passwd
11841184
```
11851185
1186-
💡 Note
1186+
💡 **Note:**
11871187
This command is very powerful and it is highly recommended to consult its manual. It has many derivatives.
11881188
11891189
It is possible to search for a string in a file tree with the `-R` option.
@@ -1224,10 +1224,10 @@ $ find /home -name "test[123]*"
12241224
/home/rockstar/test362
12251225
```
12261226
1227-
💡 Note
1227+
💡 **Note:**
12281228
Always surround words containing meta-characters with `"` to prevent them from being replaced by the names of files that meet the criteria.
12291229
1230-
💡 Warning
1230+
💡 **Warning:**
12311231
Do not confuse shell meta-characters with regular expression meta-characters. The `grep` command uses regular expression meta-characters.
12321232
12331233
## Redirects and pipes
@@ -1256,7 +1256,7 @@ It is possible to redirect the input stream from another file with the character
12561256
$ ftp -in serverftp << ftp-commands.txt
12571257
```
12581258
1259-
💡 Note
1259+
💡 **Note:**
12601260
Only commands that require keyboard input will be able to handle input redirection.
12611261
12621262
Input redirection can also be used to simulate user interactivity. The command will read the input stream until it encounters the defined keyword after the input redirection.
@@ -1283,7 +1283,7 @@ STOP
12831283
12841284
The shell exits the `ftp` command when it receives a line containing only the keyword.
12851285
1286-
💡 Warning
1286+
💡 **Warning:**
12871287
The ending keyword, here `END` or `STOP`, must be the only word on the line and must be at the beginning of the line.
12881288
12891289
The standard input redirection is rarely used because most commands accept a filename as an argument.
@@ -1437,7 +1437,7 @@ For permanent use, they must be created in the :
14371437
* `.bashrc` file in the user's login directory;
14381438
* `/etc/profile.d/alias.sh` file for all users.
14391439
1440-
💡 Warning
1440+
💡 **Warning:**
14411441
Special care must be taken when using aliases which can be potentially dangerous! For example, an alias set up without the administrator's knowledge :
14421442
14431443
```bash

0 commit comments

Comments
 (0)