diff --git a/docs/books/admin_guide/03-commands.zh.md b/docs/books/admin_guide/03-commands.zh.md
index 82095c4cda..2dd71e0539 100644
--- a/docs/books/admin_guide/03-commands.zh.md
+++ b/docs/books/admin_guide/03-commands.zh.md
@@ -4,6 +4,7 @@ author: Antoine Le Morvan
contributors: Steven Spencer, Aditya Putta, tianci li, Grammaresque, Ganna Zhyrnova
---
+
# 针对 Linux 用户的命令
在本章中,您将学习如何使用 Linux 中的命令。
@@ -12,13 +13,13 @@ contributors: Steven Spencer, Aditya Putta, tianci li, Grammaresque, Ganna Zhyrn
**目标**: 在本章中,未来的 Linux 管理员们将学习如何:
-:heavy_check_mark: 在系统树中 **移动**
-。 :heavy_check_mark: **创建** 一个文本文件, **显示** 其内容并对其 **修改**。
+:heavy_check_mark: 在系统树中 **移动**。
+:heavy_check_mark: **创建** 一个文本文件, **显示** 其内容并对其 **修改**。
:heavy_check_mark: **使用** 最实用的Linux命令。
:checkered_flag: **用户命令**,**linux**
-**知识**: :star:
+**知识性**: :star:
**复杂度**: :star:
**阅读时间**: 40 分钟
@@ -45,12 +46,15 @@ contributors: Steven Spencer, Aditya Putta, tianci li, Grammaresque, Ganna Zhyrn
* 数字标识符:**UID** (用户标识符)。
* 所属组标识符:**GID** (用户组标识符)。
* **命令解释器**,例如 shell ,不同用户可以不同。
-* **连接目录**,例如 __家目录__ 。
+* **连接目录**,例如 **家目录** 。
在其他文件中,用户由以下条目定义:
* **密码**,它会在储存之前被加密 (`/etc/shadow`)。
-* **命令提示符**,或登录 __提示符__ ,`#` 代表管理员,`$` 代表其他用户 (`/etc/profile`)。
+* **命令提示符** 或 **登录提示符**,其符号为
+
+ * `#` 为管理员
+ * 其他用户为 `$` (`/etc/profile`)。
根据系统的安全策略,设置的密码有一定的字符数和复杂度要求。
@@ -58,7 +62,7 @@ contributors: Steven Spencer, Aditya Putta, tianci li, Grammaresque, Ganna Zhyrn
通常,用户的登录目录被储存在工作站的 `/home` 目录中。 它将包含用户的个人数据和应用程序的配置文件。 默认情况下,登录时会选择 登录目录 作为当前目录。
-一个工作站类型的安装 (带有图形界面) 将在终端 1 上开启此界面。 Linux是多用户的,可以在不同的 **物理终端**(TTY) 或 **虚拟终端**(PTS) 上多次连接多个用户。 虚拟终端可以在图形化环境中使用。 用户可通过 Alt + Fx 或 CTRL + Alt + Fx 来切换物理终端。
+一个工作站类型的安装 (带有图形界面) 将在终端 1 上开启此界面。 Linux是多用户的,可以在不同的 **物理终端**(TTY) 或 **虚拟终端**(PTS) 上多次连接多个用户。 虚拟终端可以在图形化环境中使用。 用户可通过 ++Alt++ + ++Fx++ 或 ++CTRL++ + ++Alt++ + ++Fx++ 来切换物理终端。
### shell
@@ -72,7 +76,7 @@ contributors: Steven Spencer, Aditya Putta, tianci li, Grammaresque, Ganna Zhyrn
* 显示命令提示符。
* 等等
-CTRL + C 两个按键用于中断正在运行的命令。
+++ctrl+c++ 两个按键用于中断正在运行的命令。
命令的使用通常遵循以下顺序:
@@ -89,19 +93,19 @@ command [option(s)] [arguments(s)]
可以将一些短选项组合在一起:
```bash
-$ ls -l -i -a
+ls -l -i -a
```
等同于:
```bash
-$ ls -lia
+ls -lia
```
-当然,在选项后面可以跟几个对象:
+选项后面可以有多个参数:
```bash
-$ ls -lia /etc /home /var
+ls -lia /etc /home /var
```
在文献资料中,术语 "option"(选项) 相当于术语"parameter"(参数),后者在编程中更常用。 选项或参数的可选部分用方括号括起来 —— `[` 和 `]`。 当可能有多个选项时,一个称为 "管道" 的垂直条将它们分隔开来 `[a|e|i]`。
@@ -189,7 +193,7 @@ man passwd
这将告诉管理员 passwd 命令及其选项等。 但这条命令:
```bash
-$ man 5 passwd
+man 5 passwd
```
将告知用户 passwd 命令有关的文件。
@@ -481,16 +485,16 @@ $ ls /home
但是,`ls` 命令有很多选项(见 `man` ):
-| 选项 | 信息 |
-| ---- | -------------------------------------------------------------------- |
-| `-d` | 显示有关目录的信息,而不是列出其内容。 |
-| `-g` | 与 -l 选项类似,但不列出所有者。 |
-| `-h` | 以最合适的格式显示文件大小(字节、千字节、兆字节、吉字节等)。 `h` 表示人类可读。 需要与 -l 选项一起使用。 |
-| `-s` | 以块为单位显示每个文件的分配大小。 在 GNU/Linux 操作系统中,"块" 是文件系统中最小的存储单位,一个块等于4096Byte。 |
-| `-A` | 显示目录中除 `.` 和 `..` 之外的所有文件 |
-| `-R` | 递归显示子目录的内容。 |
-| `-F` | 显示文件的类型。 为目录打印 `/` ,为执行文件打印 `*` ,为符号链接打印 `@` ,对文本文件不打印任何内容。 |
-| `-X` | 根据文件的扩展名对文件进行排序。 |
+| 选项 | 信息 |
+| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `-d` | 显示有关目录的信息,而不是列出其内容。 |
+| `-g` | 与 -l 选项类似,但不列出所有者。 |
+| `-h` | 以最合适的格式显示文件大小(字节、千字节、兆字节、吉字节等)。 `h` 表示人类可读。 需要与 -l 选项一起使用。 |
+| `-s` | 以块为单位显示每个文件的分配大小。 在 `ls` 命令中,单个块的默认大小为 1024 字节。 在 GNU/Linux 操作系统中,"块"(block) 是文件系统中最小的存储单元,通常而言,一个块等于 4096 字节。 在 Windows 操作系统中,以 NTFS 文件系统为例,其最小的存储单元被称为 "集群"(Cluster)。 最小存储单元名称的定义可能因文件系统不同而不同。 |
+| `-A` | 显示目录中除 `.` 和 `..` 之外的所有文件 |
+| `-R` | 递归显示子目录的内容。 |
+| `-F` | 显示文件的类型。 为目录打印 `/` ,为执行文件打印 `*` ,为符号链接打印 `@` ,对文本文件不打印任何内容。 |
+| `-X` | 根据文件的扩展名对文件进行排序。 |
* 运行 `ls -lia` 命令生成的列的说明:
@@ -550,7 +554,7 @@ $ ls -lhR /var/ | grep ^\- | grep -E "[1-9]*\.[0-9]*M"
当然,我们强烈建议您使用 `find` 命令。
```bash
-$ find /var -size +1M -a -size -1024M -a -type f -exec ls -lh {} \;
+find /var -size +1M -a -size -1024M -a -type f -exec ls -lh {} \;
```
* 显示文件夹的权限:
@@ -570,14 +574,14 @@ drwxr-xr-x. 2 root root 4096 17 nov. 17:48 alternatives
默认情况下,上述命令将显示文件夹(里面)的内容。 对于文件夹本身,您可以使用 `-d` 选项。
```bash
-$ ls -ld /etc
+ls -ld /etc
drwxr-xr-x. 69 root root 4096 18 nov. 17:05 /etc
```
* 按文件大小排序,最大优先:
```bash
-$ ls -lhS
+ls -lhS
```
* 使用 `-l` 的 时间/日期 格式:
@@ -601,7 +605,7 @@ $ ls -dF /etc
* 隐藏一些扩展名:
```bash
-$ ls /etc --hide=*.conf
+ls /etc --hide=*.conf
```
### `mkdir` 命令
@@ -615,7 +619,7 @@ mkdir [-p] directory [directory] [...]
示例:
```bash
-$ mkdir /home/rockstar/work
+mkdir /home/rockstar/work
```
必须存在 "rockstar" 目录才能创建 "work" 目录。
@@ -637,7 +641,7 @@ touch [-t date] file
示例:
```bash
-$ touch /home/rockstar/myfile
+touch /home/rockstar/myfile
```
| 选项 | 信息 |
@@ -657,7 +661,7 @@ $ touch /home/rockstar/myfile
示例:
```bash
-$ rmdir /home/rockstar/work
+rmdir /home/rockstar/work
```
| 选项 | 信息 |
@@ -716,8 +720,9 @@ mv file [file ...] destination
示例:
```bash
-$ mv /home/rockstar/file1 /home/rockstar/file2
-$ mv /home/rockstar/file1 /home/rockstar/file2 /tmp
+mv /home/rockstar/file1 /home/rockstar/file2
+
+mv /home/rockstar/file1 /home/rockstar/file2 /tmp
```
| 选项 | 信息 |
@@ -728,37 +733,37 @@ $ mv /home/rockstar/file1 /home/rockstar/file2 /tmp
以下几个具体案例将帮助您了解可能出现的难题:
```bash
-$ mv /home/rockstar/file1 /home/rockstar/file2
+mv /home/rockstar/file1 /home/rockstar/file2
```
将 `file1` 重命名为 `file2`。 如果 `file2` 已经存在,则将文件内容替换为`file1`。
```bash
-$ mv /home/rockstar/file1 /home/rockstar/file2 /tmp
+mv /home/rockstar/file1 /home/rockstar/file2 /tmp
```
将 `file1` 和 `file2` 移动到 `/tmp` 目录。
```bash
-$ mv file1 /repexist/file2
+mv file1 /repexist/file2
```
-将 `file1` 移动到 `repext` 并重命名为 `file2`。
+将 `file1` 移动到 `repexist` 目录中并重命名为 `file2`。
```bash
-$ mv file1 file2
+mv file1 file2
```
`file1` 已重命名为 `file2` 。
```bash
-$ mv file1 /repexist
+mv file1 /repexist
```
-如果目标目录存在, 则 `file1` 将移动到 `/repext` 中。
+如果目标目录存在, 则 `file1` 将移动到 `/repexist` 中。
```bash
-$ mv file1 /wrongrep
+mv file1 /wrongrep
```
如果目标目录不存在,`file1` 将在根目录中被重命名为 `wrongrep` 。
@@ -774,7 +779,7 @@ cp file [file ...] destination
示例:
```bash
-$ cp -r /home/rockstar /tmp
+cp -r /home/rockstar /tmp
```
| 选项 | 信息 |
@@ -792,19 +797,19 @@ cp file1 /repexist/file2
`file1` 将复制到 `/repexist` 目录下,且文件名为 `file2` 。
```bash
-$ cp file1 file2
+cp file1 file2
```
在此目录中,`file1` 已经复制为 `file2` 。
```bash
-$ cp file1 /repexist
+cp file1 /repexist
```
如果目标目录存在,则 `file1` 将被复制到 `/repexist` 目录中。
```bash
-$ cp file1 /wrongrep
+cp file1 /wrongrep
```
如果目标目录不存在,`file1` 将在根目录中被重命名为 `wrongrep` 。
@@ -862,7 +867,7 @@ less file1 [files]
| Enter | 下移一行。 |
| Space | 向下移动一页。 |
| PgUp 和 PgDn | 向上或向下移动一页。 |
-| gg 和 G | 移动到文件的首页或尾页。 |
+| g 和 G | 移动到文件的首页或尾页。 |
| `/texte` | 搜索文本。 |
| q | 退出 `less` 命令。 |
@@ -877,19 +882,19 @@ cat file1 [files]
例1 - 在标准输出中显示文件的内容:
```bash
-$ cat /etc/passwd
+cat /etc/passwd
```
例2 - 在标准输出中显示多个文件的内容:
```bash
-$ cat /etc/passwd /etc/group
+cat /etc/passwd /etc/group
```
例3 - 使用输出重定向将多个文件的内容合并为一个文件:
```bash
-$ cat /etc/passwd /etc/group > usersAndGroups.txt
+cat /etc/passwd /etc/group > usersAndGroups.txt
```
例4 - 显示行号:
@@ -1017,7 +1022,7 @@ polkitd:x:998:996:User for polkitd:/:/sbin/nologin
`sort` 命令也允许您用 `-R` 选项来随机排序值:
```bash
-$ sort -R /etc/passwd
+sort -R /etc/passwd
```
* 对 IP 地址进行排序
@@ -1026,7 +1031,7 @@ $ sort -R /etc/passwd
以下是文件 `dns-client.txt` 的示例:
-```
+```text
192.168.1.10
192.168.1.200
5.1.150.146
@@ -1049,14 +1054,15 @@ $ sort -nr dns-client.txt
这是文件 `colours.txt` 的示例:
-```
+```text
Red
Green
Blue
Red
Pink
```
-```
+
+```text
$ sort -u colours.txt
Blue
Green
@@ -1070,7 +1076,7 @@ Red
这是文件 `size.txt` 的示例:
-```
+```text
1.7G
18M
69K
@@ -1136,7 +1142,7 @@ find directory [-name name] [-type type] [-user login] [-date date]
可以使用 `find` 命令的 `-exec` 选项对每个结果行执行命令:
```bash
-$ find /tmp -name *.txt -exec rm -f {} \;
+find /tmp -name *.txt -exec rm -f {} \;
```
如上命令所示,在`/tmp` 目录下搜索所有的 `*.txt` 文件并将其删除。
@@ -1203,12 +1209,13 @@ root:x:0:0:root:/root:/bin/bash
| `-w` | 搜索准确的单词。 |
`grep` 命令返回包含您要查找的字符串的完整行。
+
* `^` 特殊字符用于搜索行首的字符串。
* 特殊字符 `$` 用来搜索行尾的字符串。
-```bash
-$ grep -w "^root" /etc/passwd
-```
+ ```bash
+ grep -w "^root" /etc/passwd
+ ```
!!! Note "说明"
@@ -1288,7 +1295,7 @@ $ find /home -name "test[123]*"
可以使用字符 `<` 或 `<<` 重定向来自另一个文件的输入流。 命令将读取文件,而不是键盘:
```bash
-$ ftp -in serverftp << ftp-commands.txt
+ftp -in serverftp << ftp-commands.txt
```
!!! Note "说明"
@@ -1329,9 +1336,9 @@ STOP
```bash
$ wc -l .bash_profile
-27 .bash_profile # the number of lines is followed by the file name
+27 .bash_profile # 行数后面跟随文件名
$ wc -l < .bash_profile
-27 # returns only the number of lines
+27 # 仅返回行数
```
### 输出重定向
@@ -1341,13 +1348,13 @@ $ wc -l < .bash_profile
简单的使用 `>` 重定向覆盖输出文件的内容:
```bash
-$ date +%F > date_file
+date +%F > date_file
```
当使用 `>>` 字符时,它表示命令的输出结果被追加到文件内容中。
```bash
-$ date +%F >> date_file
+date +%F >> date_file
```
在这两种情况下,文件在不存在时自动创建。
@@ -1355,8 +1362,9 @@ $ date +%F >> date_file
也可以将标准错误输出重定向到另一个文件。 这一次需要指定通道编号(通道0和1可以省略该编号):
```bash
-$ ls -R / 2> errors_file
-$ ls -R / 2>> errors_file
+ls -R / 2> errors_file
+
+ls -R / 2>> errors_file
```
### 重定向示例
@@ -1364,19 +1372,19 @@ $ ls -R / 2>> errors_file
将2个输出重定向到 2 个文件:
```bash
-$ ls -R / >> ok_file 2>> nok_file
+ls -R / >> ok_file 2>> nok_file
```
将2个输出重定向到单个文件:
```bash
-$ ls -R / >> log_file 2>&1
+ls -R / >> log_file 2>&1
```
*stderr* 重定向到 "无底洞" (`/dev/null`):
```bash
-$ ls -R / 2>> /dev/null
+ls -R / 2>> /dev/null
```
当两个输出流都被重定向时,屏幕上不会显示任何信息。 要同时使用输出重定向且保持显示,您必须使用命令 `tee` 。
@@ -1398,31 +1406,31 @@ $ ls -R / 2>> /dev/null
仅显示开头:
```bash
-$ ls -lia / | head
+ls -lia / | head
```
只显示末尾:
```bash
-$ ls -lia / | tail
+ls -lia / | tail
```
对结果进行排序:
```bash
-$ ls -lia / | sort
+ls -lia / | sort
```
计算单词/字符的数量:
```bash
-$ ls -lia / | wc
+ls -lia / | wc
```
在结果中搜索字符串:
```bash
-$ ls -lia / | grep fichier
+ls -lia / | grep fichier
```
## 特殊点
@@ -1434,8 +1442,7 @@ $ ls -lia / | grep fichier
它与 `|` 管道结合使用,以接收要重定向的命令的输出作为输入:
```bash
-$ ls -lia / | tee fic
-$ cat fic
+ls -lia / | tee fic
```
`-a` 选项表示添加到文件当中,而不是覆盖文件。
@@ -1447,13 +1454,13 @@ $ cat fic
例如:
```bash
-$ ll
+ll
```
将替换该命令:
```bash
-$ ls -l
+ls -l
```
`alias` 命令会列出当前会话的别名。 在 Linux 发行版上,别名是默认设置的。 这里是 Rocky 服务器的别名:
@@ -1487,13 +1494,13 @@ alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-ti
删除单个别名:
```bash
-$ unalias ll
+unalias ll
```
要删除所有别名:
```bash
-$ unalias -a
+unalias -a
```
要暂时禁用别名,组合是 `\<别名>`
@@ -1501,7 +1508,7 @@ $ unalias -a
例如,如果我们这样做:
```bash
-$ type ls
+type ls
```
它可能会返回以下内容:
@@ -1589,7 +1596,7 @@ none on /proc/sys/fs/binfmt_misc type binfmt_misc (r
一旦用户键入 ENTER ,所有命令都将按输入顺序运行。
```bash
-$ ls /; cd /home; ls -lia; cd /
+ls /; cd /home; ls -lia; cd /
```
## 检测所学知识
@@ -1600,26 +1607,26 @@ $ ls /; cd /home; ls -lia; cd /
:heavy_check_mark: 哪些命令允许您搜索有关命令的帮助?
-- [ ] `google`
-- [ ] `chuck --norris`
-- [ ] `info`
-- [ ] `apropos`
-- [ ] `whatis`
+* [ ] `google`
+* [ ] `chuck --norris`
+* [ ] `info`
+* [ ] `apropos`
+* [ ] `whatis`
:heavy_check_mark: 哪个命令允许您查看用户的历史记录?
:heavy_check_mark: 哪个命令允许您在文件中搜索文本?
-- [ ] `find`
-- [ ] `grep`
+* [ ] `find`
+* [ ] `grep`
:heavy_check_mark: 哪个命令允许您搜索文件?
-- [ ] `find`
-- [ ] `grep`
+* [ ] `find`
+* [ ] `grep`
:heavy_check_mark: 哪个命令将命令的错误流重定向到新的 `errors.log` 文件?
-- [ ] `ls -R / 2> errors.log`
-- [ ] `ls -R / 2>> errors.log`
-- [ ] `ls -R / 2> errors.log 2>&1`
+* [ ] `ls -R / 2> errors.log`
+* [ ] `ls -R / 2>> errors.log`
+* [ ] `ls -R / 2> errors.log 2>&1`
diff --git a/docs/books/admin_guide/05-vi.zh.md b/docs/books/admin_guide/05-vi.zh.md
index 685d0c89f7..548ff6d99d 100644
--- a/docs/books/admin_guide/05-vi.zh.md
+++ b/docs/books/admin_guide/05-vi.zh.md
@@ -10,12 +10,12 @@ title: VI 文本编辑器
**目标**: 在本章中,未来的 Linux 管理员们将学习如何:
-:heavy_check_mark: 使用VI编辑器的主要命令;
+:heavy_check_mark: 使用VI编辑器的主要命令;
:heavy_check_mark: 使用VI编辑器修改文本。
:checkered_flag: **用户命令**,**linux**
-**知识性**: :star:
+**知识性**: :star:
**复杂度**: :star: :star:
**阅读时间**: 20 分钟
@@ -36,14 +36,14 @@ title: VI 文本编辑器
`vi` 命令可打开 *VI* 文本编辑器。
-```
+```bash
vi [-c command] [file]
```
示例:
-```
-$ vi /home/rockstar/file
+```bash
+vi /home/rockstar/file
```
| 选项 | 信息 |
@@ -58,7 +58,7 @@ $ vi /home/rockstar/file
`vim`编辑器对 VI 的界面和功能进行了许多改进。
-```
+```bash
vim [-c command] [file]
```
@@ -78,9 +78,9 @@ vim [-c command] [file]
要退出 VI ,请从 command 模式中按:,然后键入:
-* `q`不保存退出(_quit_);
-* `w` 保存当前你的工作内容(_write_);
-* `wq`(_write quit_) 或者 `x`(_eXit_)保存并退出。
+* `q`不保存退出(*quit*);
+* `w` 保存当前你的工作内容(*write*);
+* `wq`(*write quit*) 或者 `x`(*eXit*)保存并退出。
在命令模式下,连续两次单击大写状态的Z键即可保存并退出。
@@ -210,11 +210,11 @@ VI 的原理是在 *command* 模式和 *insertion* 模式之间交替使用。
* 在字符前插入文本:
-i (_insert_)
+i (*insert*)
* 在字符后插入文本:
-a (_append_)
+a (*append*)
### 与行相关的
@@ -292,7 +292,7 @@ VI 允许通过管理以下各项进行文本编辑:
* 替换一个单词:
-cw_word_ESC
+cw*word*ESC
!!! Tip "提示"
@@ -395,9 +395,9 @@ VI 允许通过管理以下各项进行文本编辑:
示例:
-`/[Ww]ord`:搜索_word_ 或者 _Word_
+`/[Ww]ord`:搜索*word* 或者 *Word*
-`/[1-9]word`:搜索 _1word_、 _2word_... _`x`字_ 中, `x` 表示一个数字
+`/[1-9]word`:搜索 *1word*、 *2word*... *`x`word* 中, `x` 表示一个数字
* `^` :搜索以某字符开头的行
@@ -415,7 +415,7 @@ VI 允许通过管理以下各项进行文本编辑:
示例:
-`/W.rd` : 搜索 _Word_ 、 _Ward_ ...
+`/W.rd` : 搜索 *Word* 、 *Ward* ...
* `*` :前一个字符匹配的次数、0次或任意次数。
@@ -507,8 +507,8 @@ VI 允许通过管理以下各项进行文本编辑:
可通过指定为会话加载的选项来执行 VI 。 为此,您必须使用 `-c` 选项:
-```
-$ vi -c "set nu" /home/rockstar/file
+```bash
+vi -c "set nu" /home/rockstar/file
```
也可以在用户家目录下,在名为 `.exrc` 的文件中输入 <*>Ex* 命令。 在每次VI或VIM启动时,都将读取并应用命令。
@@ -517,6 +517,6 @@ $ vi -c "set nu" /home/rockstar/file
有一个学习如何使用 VI 的教程。 可以使用命令 `vimtutor` 访问它。
-```
-$ vimtutor
+```bash
+vimtutor
```
diff --git a/docs/books/learning_rsync/02_rsync_demo01.fr.md b/docs/books/learning_rsync/02_rsync_demo01.fr.md
new file mode 100644
index 0000000000..50eabbd220
--- /dev/null
+++ b/docs/books/learning_rsync/02_rsync_demo01.fr.md
@@ -0,0 +1,148 @@
+---
+title: démo rsync 01
+author: tianci li
+contributors: Steven Spencer, Ganna Zhyrnova
+update: 2021-11-04
+---
+
+# Préface
+
+`rsync` doit effectuer l'authentification de l'utilisateur avant la synchronisation des données. **Il y a deux méthodes de protocole d'authentification : protocole SSH et protocole rsync (le port par défaut de rsync est 873)**
+
+* Méthode de connexion de vérification du protocole SSH : utiliser le protocole SSH comme base pour l'authentification de l'identité de l'utilisateur (c'est-à-dire utiliser l'utilisateur système et le mot de passe de GNU/Linux lui-même pour la vérification), puis effectuer une synchronisation des données.
+* méthode de connexion de vérification du protocole rsync : utilisez le protocole rsync pour l'authentification de l'utilisateur (utilisateurs système non-GNU/Linux, similaires aux utilisateurs virtuels vsftpd), puis effectuez la synchronisation des données.
+
+Avant la démonstration spécifique de la synchronisation rsync, vous devez utiliser la commande `rsync`. Dans Rocky Linux 8, le paquet rpm rsync est installé par défaut et la version est 3.1.3-12, comme suit :
+
+```bash
+[root@Rocky ~]# rpm -qa|grep rsync
+rsync-3.1.3-12.el8.x86_64
+```
+
+```txt
+Basic format: rsync [options] original location target location
+Commonly used options:
+-a: archive mode, recursive and preserves the attributes of the file object, which is equivalent to -rlptgoD (without -H, -A, -X)
+-v: Display detailed information about the synchronization process
+-z: compress when transferring files
+-H: Keep hard link files
+-A: retain ACL permissions
+-X: retain chattr permissions
+-r: Recursive mode, including all files in the directory and subdirectories
+-l: still reserved for symbolic link files
+-p: Permission to retain file attributes
+-t: time to retain file attributes
+-g: retain the group belonging to the file attribute (only for super users)
+-o: retain the owner of the file attributes (only for super users)
+-D: Keep device files and other special files
+```
+
+Utilisation favorisée par l'auteur : `rsync -avz original location target location`
+
+## Description de l'environnement
+
+| Élément | Observation |
+| ----------------------- | ---------------- |
+| Rocky Linux 8 (Serveur) | 192.168.100.4/24 |
+| Fedora 34 (client) | 192.168.100.5/24 |
+
+Vous pouvez utiliser Fedora 34 pour télécharger
+
+```mermaid
+graph LR;
+RockyLinux8-->|pull/download|Fedora34;
+Fedora34-->|push/upload|RockyLinux8;
+```
+
+Vous pouvez également utiliser Rocky Linux 8 pour télécharger
+
+```mermaid
+graph LR;
+RockyLinux8-->|push/upload|Fedora34;
+Fedora34-->|pull/download|RockyLinux8;
+```
+
+## Démonstration basée sur le protocole SSH
+
+!!! tip "Astuce"
+
+ Ici, Rocky Linux 8 et Fedora 34 utilisent l'utilisateur root pour se connecter. Fedora 34 est le client et Rocky Linux 8 le serveur.
+
+### pull/download
+
+Puisqu'il est basé sur le protocole SSH, nous allons créer d'abord un utilisateur sur le serveur :
+
+```bash
+[root@Rocky ~]# useradd testrsync
+[root@Rocky ~]# passwd testrsync
+```
+
+Du côté du client, nous utilisons pull/download et le fichier sur le serveur est /rsync/aabbcc
+
+```bash
+[root@fedora ~]# rsync -avz testrsync@192.168.100.4:/rsync/aabbcc /root
+testrsync@192.168.100.4 ' s password:
+receiving incremental file list
+aabbcc
+sent 43 bytes received 85 bytes 51.20 bytes/sec
+total size is 0 speedup is 0.00
+[root@fedora ~]# cd
+[root@fedora ~]# ls
+aabbcc
+```
+Le transfert a réussi.
+
+!!! tip "Astuce"
+
+ Si le port SSH du serveur n'est pas le port par défaut 22, vous pouvez spécifier le port de manière similaire---`rsync -avz -e 'ssh -p [port]' `.
+
+### push/upload
+
+```bash
+[root@fedora ~]# touch fedora
+[root@fedora ~]# rsync -avz /root/* testrsync@192.168.100.4:/rsync/
+testrsync@192.168.100.4 ' s password:
+sending incremental file list
+anaconda-ks.cfg
+fedora
+rsync: mkstemp " /rsync/.anaconda-ks.cfg.KWf7JF " failed: Permission denied (13)
+rsync: mkstemp " /rsync/.fedora.fL3zPC " failed: Permission denied (13)
+sent 760 bytes received 211 bytes 277.43 bytes/sec
+total size is 883 speedup is 0.91
+rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1330) [sender = 3.2.3]
+```
+
+**Demande de permission refusée, comment y faire face ?**
+
+Vérifiez d'abord les permissions du répertoire /rsync/ . Évidemment, il n'y a pas de permission "w". Nous pouvons utiliser `setfacl` pour accorder des permission :
+
+```bash
+[root@Rocky ~ ] # ls -ld /rsync/
+drwxr-xr-x 2 root root 4096 November 2 15:05 /rsync/
+```
+
+```bash
+[root@Rocky ~ ] # setfacl -mu:testrsync:rwx /rsync/
+[root@Rocky ~ ] # getfacl /rsync/
+getfacl: Removing leading ' / ' from absolute path names
+# file: rsync/
+# owner: root
+# group: root
+user::rwx
+user:testrsync:rwx
+group::rx
+mask::rwx
+other::rx
+```
+
+Essayez à nouveau !
+
+```bash
+[root@fedora ~ ] # rsync -avz /root/* testrsync@192.168.100.4:/rsync/
+testrsync@192.168.100.4 ' s password:
+sending incremental file list
+anaconda-ks.cfg
+fedora
+sent 760 bytes received 54 bytes 180.89 bytes/sec
+total size is 883 speedup is 1.08
+```
diff --git a/docs/books/learning_rsync/03_rsync_demo02.fr.md b/docs/books/learning_rsync/03_rsync_demo02.fr.md
new file mode 100644
index 0000000000..bb125ada95
--- /dev/null
+++ b/docs/books/learning_rsync/03_rsync_demo02.fr.md
@@ -0,0 +1,129 @@
+---
+title: rsync demo 02
+author: tianci li
+contributors: Steven Spencer, Ganna Zhyrnova
+update: 2021-11-04
+---
+
+# Démonstration basée sur le protocole rsync
+Dans vsftpd, il y a des utilisateurs virtuels (utilisateurs personnalisés par l'administrateur) parce qu'il est très déconseillé d'utiliser des utilisateurs anonymes et des utilisateurs locaux. Nous savons qu'un serveur basé sur le protocole SSH doit s'assurer qu'il y a un système d'utilisateurs. Quand il y a beaucoup d'exigences de synchronisation, il peut être nécessaire de créer de nombreux utilisateurs. Cela ne répond évidemment pas aux normes de fonctionnement et de maintenance de GNU/Linux (plus il y a d'utilisateurs, plus il y a d'utilisateurs non sécurisés). Dans rsync, pour des raisons de sécurité, il y a une méthode d'authentification du protocole rsync.
+
+**Comment faire?**
+
+Il suffit d'écrire les paramètres et valeurs correspondants dans le fichier de configuration. Dans Rocky Linux 8, vous devez créer manuellement le fichier /etc/rsyncd.conf.
+
+```bash
+[root@Rocky ~]# touch /etc/rsyncd.conf
+[root@Rocky ~]# vim /etc/rsyncd.conf
+```
+
+Some parameters and values of this file are as follows, [ here ](04_rsync_configure.md) has more parameter descriptions:
+
+| Élément | Observation |
+| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| address = 192.168.100.4 | L'adresse IP sur laquelle rsync écoute par défaut |
+| port = 873 | port d'écoute par défaut de rsync |
+| pid file = /var/run/rsyncd.pid | Emplacement du fichier pid du processus |
+| log file = /var/log/rsyncd.log | Emplacement du fichier log |
+| [share] | Partage de nom |
+| comment = rsync | Remarques ou informations de description |
+| path = /rsync/ | L'emplacement du chemin système où il est situé |
+| read only = yes | yes signifie lecture seule, pas d'écriture |
+| dont compress = \*.gz \*.gz2 \*.zip | Quels types de fichiers ne sont pas compressés |
+| auth users = li | Activez les utilisateurs virtuels et définissez un utilisateur virtuel. Besoin de le créer vous-même |
+| secrets file = /etc/rsyncd_users.db | Utilisé pour spécifier l'emplacement du fichier de mot de passe de l'utilisateur virtuel, qui doit se terminer en .db. Le format de contenu du fichier est "Username : mot de passe", un par ligne |
+
+!!! tip "Astuce"
+
+ La permission du fichier de mot de passe doit être 600.
+
+Écrire du contenu du fichier dans /etc/rsyncd.conf et écrire le nom d'utilisateur et le mot de passe dans /etc/rsyncd_users.db, la permission est de 600
+
+```bash
+[root@Rocky ~]# cat /etc/rsyncd.conf
+address = 192.168.100.4
+port = 873
+pid file = /var/run/rsyncd.pid
+log file = /var/log/rsyncd.log
+[share]
+comment = rsync
+path = /rsync/
+read only = yes
+dont compress = *.gz *.bz2 *.zip
+auth users = li
+secrets file = /etc/rsyncd_users.db
+[root@Rocky ~]# ll /etc/rsyncd_users.db
+-rw------- 1 root root 9 November 2 16:16 /etc/rsyncd_users.db
+[root@Rocky ~]# cat /etc/rsyncd_users.db
+li:13579
+```
+
+Vous devrez peut-être executer `dnf -y install rsync-daemon` avant de pouvoir démarrer le service : `systemctl start rsyncd.service`
+
+```bash
+[root@Rocky ~]# systemctl start rsyncd.service
+[root@Rocky ~]# netstat -tulnp
+Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
+tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 691/sshd
+tcp 0 0 192.168.100.4:873 0.0.0.0:* LISTEN 4607/rsync
+tcp6 0 0 :::22 :::* LISTEN 691/sshd
+udp 0 0 127.0.0.1:323 0.0.0.0:* 671/chronyd
+udp6 0 0 ::1:323 :::* 671/chronyd
+```
+
+## pull/download
+
+Créer un fichier dans le serveur pour vérification : `[root@Rocky]# touch /rsync/rsynctest.txt`
+
+Le client fait ce qui suit :
+
+```bash
+[root@fedora ~]# rsync -avz li@192.168.100.4::share /root
+Password:
+receiving incremental file list
+./
+rsynctest.txt
+sent 52 bytes received 195 bytes 7.16 bytes/sec
+total size is 883 speedup is 3.57
+[root@fedora ~]# ls
+aabbcc anaconda-ks.cfg fedora rsynctest.txt
+```
+
+success ! En plus de l'écriture ci-dessus basée sur le protocole rsync, vous pouvez également écrire comme ceci : `rsync://li@10.1.2.84/share`
+
+## push/upload
+
+```bash
+[root@fedora ~]# touch /root/fedora.txt
+[root@fedora ~]# rsync -avz /root/* li@192.168.100.4::share
+Password:
+sending incremental file list
+rsync: [sender] read error: Connection reset by peer (104)
+rsync error: error in socket IO (code 10) at io.c(784) [sender = 3.2.3]
+```
+
+On vous indique que l'erreur de lecture est liée à la configuration "read only = yes" du serveur. Changez-la en "no" et redémarrez le service `[root@Rocky ~]# systemctl restart rsyncd.service`
+
+Essayez à nouveau, à l'affichage de la permission refusée :
+
+```bash
+[root@fedora ~]# rsync -avz /root/* li@192.168.100.4::share
+Password:
+sending incremental file list
+fedora.txt
+rsync: mkstemp " /.fedora.txt.hxzBIQ " (in share) failed: Permission denied (13)
+sent 206 bytes received 118 bytes 92.57 bytes/sec
+total size is 883 speedup is 2.73
+rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1330) [sender = 3.2.3]
+```
+
+Notre utilisateur virtuel ici est li, qui est mappé à l'utilisateur système nobody par défaut. Bien sûr, vous pouvez le changer à d'autres utilisateurs du système. En d'autres termes, nobody n'a pas de permission d'écriture dans le répertoire /rsync/ . Bien sûr, nous pouvons utiliser `[root@Rocky ~]# setfacl -mu:nobody:rwx /rsync/` , essayer à nouveau.
+
+```bash
+[root@fedora ~]# rsync -avz /root/* li@192.168.100.4::share
+Password:
+sending incremental file list
+fedora.txt
+sent 206 bytes received 35 bytes 96.40 bytes/sec
+total size is 883 speedup is 3.66
+```
diff --git a/docs/books/learning_rsync/05_rsync_authentication-free_login.fr.md b/docs/books/learning_rsync/05_rsync_authentication-free_login.fr.md
new file mode 100644
index 0000000000..6d5c8b989d
--- /dev/null
+++ b/docs/books/learning_rsync/05_rsync_authentication-free_login.fr.md
@@ -0,0 +1,100 @@
+---
+title: Connexion rsync sans mot de passe
+author: tianci li
+contributors: Steven Spencer, Ganna Zhyrnova
+update: 2021-11-04
+---
+
+# Préface
+
+Suivant la [brève description de rsync](01_rsync_overview.md) nous savons que rsync est un outil de synchronisation incrémental. Chaque fois que la commande `rsync` est exécutée, les données peuvent être synchronisées une fois, mais les données ne peuvent pas être synchronisées en temps réel. Comment faire ?
+
+Grâce à inotify-tools, cet outil peut réaliser une synchronisation à sens unique en temps réel. Comme il s'agit de synchronisation des données en temps réel, il est nécessaire de se connecter sans authentification par mot de passe.
+
+**Peu importe qu'il s'agisse du protocole rsync ou du protocole SSH, les deux peuvent obtenir une connexion sans mot de passe.**
+
+## Authentification sans mot de passe du protocole SSH
+
+Premièrement, générez une paire de clés publique et privée sur le client et appuyer sur Entrée après avoir tapé la commande. La paire de clés est enregistrée dans le répertoire /root/.ssh/.
+
+```bash
+[root@fedora ~]# ssh-keygen -t rsa -b 2048
+Generating public/private rsa key pair.
+Enter file in which to save the key (/root/.ssh/id_rsa):
+Enter passphrase (empty for no passphrase):
+Enter same passphrase again:
+Your identification has been saved in /root/.ssh/id_rsa
+Your public key has been saved in /root/.ssh/id_rsa.pub
+The key fingerprint is:
+SHA256: TDA3tWeRhQIqzTORLaqy18nKnQOFNDhoAsNqRLo1TMg root@fedora
+The key's randomart image is:
++---[RSA 2048]----+
+|O+. +o+o. .+. |
+|BEo oo*....o. |
+|*o+o..*.. ..o |
+|.+..o. = o |
+|o o S |
+|. o |
+| o +. |
+|....=. |
+| .o.o. |
++----[SHA256]-----+
+```
+
+Ensuite, utilisez la commande `scp` pour télécharger le fichier de clé publique sur le serveur. Par exemple, nous téléchargeons cette clé publique à l'utilisateur **testrsync**
+
+```bash
+[root@fedora ~]# scp -P 22 /root/.ssh/id_rsa.pub root@192.168.100.4:/home/testrsync/
+```
+
+```bash
+[root@Rocky ~]# cat /home/testrsync/id_rsa.pub >> /home/testrsync/.ssh/authorized_keys
+```
+
+Essayez de vous connecter sans authentification secrète.
+
+```bash
+[root@fedora ~]# ssh -p 22 testrsync@192.168.100.4
+Last login: Tue Nov 2 21:42:44 2021 from 192.168.100.5
+[testrsync@Rocky ~]$
+```
+
+!!! tip "Astuce"
+
+ Le fichier de configuration du serveur **/etc/ssh/sshd_config** doit être ouvert PubkeyAuthentication yes
+
+## Connexion sans mot de passe pour le protocole rsync
+
+Du côté client, le service rsync prépare une variable d'environnement pour **RSYNC_PASSWORD** du système, qui est vide par défaut, comme indiqué ci-dessous :
+
+```bash
+[root@fedora ~]# echo "$RSYNC_PASSWORD"
+
+[root@fedora ~]#
+```
+
+Si vous voulez obtenir l'authentification sans mot de passe, vous devez simplement assigner une valeur à cette variable. La valeur assignée est le mot de passe précédemment défini pour l'utilisateur virtuel li. En même temps, déclarer cette variable comme une variable globale.
+
+```bash
+[root@Rocky ~]# cat /etc/rsyncd_users.db
+li:13579
+```
+
+```bash
+[root@fedora ~]# export RSYNC_PASSWORD=13579
+```
+
+Essayez ! Aucun nouveau fichier n'apparaît ici, donc la liste des fichiers transférés n'est pas affichée.
+
+```bash
+[root@fedora ~]# rsync -avz li@192.168.100.4::share /root/
+receiving incremental file list
+./
+
+sent 30 bytes received 193 bytes 148.67 bytes/sec
+total size is 883 speedup is 3.96
+```
+
+!!! tip "Tip"
+
+ Vous pouvez écrire cette variable dans **/etc/profile** pour qu'elle prenne effet définitivement. Le contenu est : `export RSYNC_PASSWORD=13579`
diff --git a/docs/books/nvchad/index.it.md b/docs/books/nvchad/index.it.md
index cdf500cfba..0ecff1025c 100644
--- a/docs/books/nvchad/index.it.md
+++ b/docs/books/nvchad/index.it.md
@@ -19,7 +19,7 @@ Volete un IDE che vi aiuti a scrivere i playbook di Ansible? Puoi ottenerlo! Vol
Grazie all'uso dei **L**anguage **S**erver **P**rotocols e dei linters, è possibile configurare un ambiente personalizzato per l'utente. La cosa migliore è che una volta configurato l'ambiente, è possibile aggiornarlo rapidamente quando sono disponibili nuove modifiche attraverso l'uso di Packer e Mason, entrambi trattati qui.
-Poiché Neovim è un fork di `vim`, l'interfaccia generale sarà familiare agli utenti di `vim`. Se non siete utenti di `vim`, con questo libro imparerete rapidamente la sintassi dei comandi. Le informazioni trattate sono molte, ma è facile seguirle e, una volta completato il contenuto, si saprà abbastanza per costruire il proprio IDE per le _proprie_ esigenze con questi strumenti.
+Poiché Neovim è un fork di `vim`, l'interfaccia generale sarà familiare agli utenti di `vim`. Se non siete utenti di `vim`, con questo libro imparerete rapidamente la sintassi dei comandi. Le informazioni trattate sono molte, ma è facile seguirle e, una volta completato il contenuto, saprete abbastanza per costruire il vostro IDE per *le vostre* esigenze con questi strumenti.
L'intento dell'autore era quello di **non** suddividere il libro in capitoli. Il motivo è che ciò implica un ordine da seguire che, nella maggior parte dei casi, non è necessario. *Si* consiglia di iniziare da questa pagina, leggere e seguire le sezioni "Software aggiuntivo", "Installare Neovim" e "Installare NvChad", ma da lì si può scegliere come procedere.
diff --git a/docs/books/nvchad/nvchad_ui/nvchad_ui.it.md b/docs/books/nvchad/nvchad_ui/nvchad_ui.it.md
index c70bcdb1eb..fde160ab5f 100644
--- a/docs/books/nvchad/nvchad_ui/nvchad_ui.it.md
+++ b/docs/books/nvchad/nvchad_ui/nvchad_ui.it.md
@@ -19,12 +19,12 @@ tags:
Per evitare confusione nei documenti che state leggendo, assumeremo che stiate usando il file predefinito `mappings.lua` e sostituiremo i comandi effettivi che dovete usare per accedere a una funzione. I riferimenti chiave standard sono:
- * leader = SPAZIO
- * A = ALT
- * C = CTRL
- * S = SHIFT
+ * leader = ++space++
+ * A = ++alt++
+ * C = ++ctrl++
+ * S = ++shift++
- Se un comando specifica `uu` come esempio, sostituiremo la combinazione di tasti attuale con SPAZIOuu.
+ Se un comando specifica `uu` come esempio, sostituiremo la combinazione di tasti attuale con ++space++ ++"uu"++.
Questo aspetto verrà trattato nuovamente nella prossima sezione [Utilizzo di NvChad](./using_nvchad.md)
@@ -40,7 +40,7 @@ L'interfaccia è già dotata di alcune funzionalità avanzate, come l'indicazion
L'interfaccia utente presenta una barra superiore chiamata `Tabufline` in cui vengono gestiti i buffer aperti. La `tabufline` viene visualizzata solo se si ha più di un file aperto. Il buffer aperto presenta l'icona del tipo di file, il nome del file e il suo stato. Lo stato è indicato da un'icona.
-Se, come nell'immagine, è presente una `x` rossa, significa che il file può essere chiuso in quanto già salvato. Se invece l'icona è un punto verde `.`, allora il file deve essere salvato e il comando di chiusura SHIFT + :q produrrà un avviso: "Nessuna scrittura dall'ultima modifica".
+Se, come nell'immagine, è presente una `x` rossa, significa che il file può essere chiuso in quanto già salvato. Se invece l'icona è un punto verde `.`, allora il file deve essere salvato e il comando di chiusura ++shift++ + ++":"++ + ++"q"++ produrrà un avviso: "Nessuna scrittura dall'ultima modifica".
A destra si trova l'icona per impostare il tema _scuro_ o _chiaro_. Facendo clic su di esso con il mouse, è possibile selezionare il tema desiderato.
@@ -52,7 +52,7 @@ A destra abbiamo anche l'icona per chiudere l'editor.
La parte centrale dell'editor è composta dal buffer attivo nell'editor in quel momento (_index.en.md_). Per introdurre qualche funzionalità aggiuntiva, possiamo lavorare contemporaneamente su due file in un buffer diviso, aprendone un altro nell'esempio _(index.it.md_).
-Nell'editor avremo il primo buffer in primo piano e il secondo elencato nella Tabufline. Ora se dividiamo il primo buffer con il comando SHIFT + :vsplit e selezioniamo il buffer di destra, facendo clic sul nome del secondo file_(index.it.md_) nella tabufline, questo verrà aperto nel buffer di destra e potremo lavorare con i due file fianco a fianco.
+Nell'editor avremo il primo buffer in primo piano e il secondo elencato nella Tabufline. Ora se dividiamo il primo buffer con il comando ++shift++ + ++":"++ + **vsplit** e selezioniamo il buffer di destra, facendo clic sul nome del secondo file_(index.it.md_) nella tabufline, questo verrà aperto nel buffer di destra e potremo lavorare con i due file fianco a fianco.

@@ -67,9 +67,9 @@ In basso troviamo la linea di stato, che gestisce le informazioni di stato. Sull
- **COMMAND**
- **VISUAL**
-La modifica di un documento inizia dalla modalità **NORMAL** in cui si apre il file, quindi si può passare alla modalità **INSERT** per la modifica e, al termine, uscire con ESC e tornare alla modalità **NORMAL**.
+La modifica di un documento inizia dalla modalità **NORMAL** in cui si apre il file, quindi si può passare alla modalità **INSERT** per la modifica e, al termine, uscire con ++esc++ e tornare alla modalità **NORMAL**.
-Ora per salvare il file si passa alla modalità **COMMAND** digitando `:` nella riga di stato seguito da `w`_(write_) per scriverlo e con ESC si torna alla modalità **NORMAL**. L'indicazione dello stato è molto utile durante l'apprendimento dell'uso, soprattutto se non si ha molta familiarità con il flusso di lavoro di Vim.
+Ora per salvare il file si passa alla modalità **COMMAND** digitando `:` nella riga di stato seguito da `w`_(write_) per scriverlo e con ++esc++ si torna alla modalità **NORMAL**. L'indicazione dello stato è molto utile durante l'apprendimento dell'uso, soprattutto se non si ha molta familiarità con il flusso di lavoro di Vim.
Troviamo quindi il nome del file aperto e, se stiamo lavorando su un repository git, avremo indicazioni sullo stato del repository. Questo grazie al plugin _lewis6991/gitsigns.nvim._
@@ -79,21 +79,21 @@ A destra troviamo il nome della cartella da cui abbiamo aperto l'editor. Nel cas
NvChad e Neovim forniscono alcuni comandi utili per visualizzare le combinazioni di tasti preimpostate e le opzioni disponibili.
-Se il tasto SPAZIO viene premuto da solo, viene visualizzata una legenda dei comandi associati, come nella seguente schermata:
+Se il tasto ++space++ viene premuto da solo, viene visualizzata una legenda dei comandi associati, come nella seguente schermata:

-Per visualizzare tutti i comandi inclusi nell'editor si può usare il comando SPAZIO + wK, che darà il seguente risultato:
+Per visualizzare tutti i comandi inclusi nell'editor si può usare il comando ++space++ + ++"wK"++, che darà il seguente risultato:

-E premendo d possiamo visualizzare i rimanenti comandi:
+E premendo ++"d"++ possiamo visualizzare i rimanenti comandi:

Come si può notare, quasi tutti i comandi si riferiscono alla navigazione all'interno del documento o del buffer. Non sono inclusi comandi per l'apertura del file. Questi sono forniti da Neovim.
-Per visualizzare tutte le opzioni di Neovim, è disponibile il comando SHIFT + :options, che presenta una struttura ad albero delle opzioni indicizzate per categoria.
+Per visualizzare tutte le opzioni di Neovim, è disponibile il comando ++shift++ + ++":"++ + **options**, che presenta una struttura ad albero delle opzioni indicizzate per categoria.

@@ -101,7 +101,7 @@ In questo modo, attraverso la guida integrata, è possibile imparare i comandi m
## NvimTree
-Per lavorare con i nostri file abbiamo bisogno di un File Explorer, fornito dal plugin _kyazdani42/nvim-tree.lua_. Con la combinazione CTRL + n possiamo aprire NvimTree.
+Per lavorare con i nostri file abbiamo bisogno di un File Explorer, fornito dal plugin _kyazdani42/nvim-tree.lua_. Con la combinazione ++ctrl++ + ++"n"++ possiamo aprire NvimTree.

diff --git a/docs/books/nvchad/template_chadrc.it.md b/docs/books/nvchad/template_chadrc.it.md
index 8081075ec6..3bcf7295fb 100644
--- a/docs/books/nvchad/template_chadrc.it.md
+++ b/docs/books/nvchad/template_chadrc.it.md
@@ -54,20 +54,20 @@ Passiamo ora ad esaminarne il contenuto:
local M = {}
-- Path to overriding theme and highlights files
-local highlights = require "custom.highlights"
+local highlights = require("custom.highlights")
M.ui = {
- theme = "onedark",
- theme_toggle = { "onedark", "one_light" },
+ theme = "onedark",
+ theme_toggle = { "onedark", "one_light" },
- hl_override = highlights.override,
- hl_add = highlights.add,
+ hl_override = highlights.override,
+ hl_add = highlights.add,
}
M.plugins = "custom.plugins"
-- check core.mappings for table structure
-M.mappings = require "custom.mappings"
+M.mappings = require("custom.mappings")
return M
```
@@ -84,7 +84,7 @@ M.load_config = function()
La sua funzione è quella di inserire i file della nostra cartella _custom_ nella configurazione di NvChad, per poi utilizzarli insieme ai file predefiniti per avviare l'istanza di _Neovim_. I file vengono inseriti nell'albero di configurazione attraverso funzioni `require` come:
```lua
-require "custom.mappings"
+require("custom.mappings")
```
La stringa **custom.mappings** indica il percorso relativo al file senza estensione rispetto al percorso predefinito, che in questo caso è **~/.config/nvim/lua/**. Il punto sostituisce la barra, poiché questa è la convenzione nel codice scritto in Lua (nel _linguaggio lua_ non esiste il concetto di _directory_).
@@ -157,17 +157,17 @@ Viene inoltre presentato un esempio di impostazioni, in modo da poterne studiare
```lua
M.general = {
- n = {
- [";"] = { ":", "enter command mode", opts = { nowait = true } },
- },
+ n = {
+ [";"] = { ":", "enter command mode", opts = { nowait = true } },
+ },
}
```
-Questa mappatura viene inserita per lo stato NORMAL `n =` il carattere ; una volta premuto sulla tastiera, riproduce il carattere :. Questo carattere è quello utilizzato per accedere alla modalità COMMAND. L'opzione `nowait = true` è anche impostata per entrare immediatamente in questa modalità. In questo modo, su una tastiera con layout QWERTY statunitense, non sarà necessario utilizzare MAIUSC per accedere alla modalità COMMAND.
+Questa mappatura viene inserita per lo stato NORMAL `n =` il carattere ++";"++ una volta premuto sulla tastiera, riproduce il carattere ++":"++. Questo carattere è quello utilizzato per accedere alla modalità COMMAND. L'opzione `nowait = true` è anche impostata per entrare immediatamente in questa modalità. In questo modo, su una tastiera con layout QWERTY statunitense, non sarà necessario utilizzare ++shift++ per accedere alla modalità COMMAND.
!!! Tip "Suggerimento"
- Per gli utenti di tastiere europee (come quella italiana), si consiglia di sostituire il carattere ; con ,.
+ Per gli utenti di tastiere europee (come quella italiana), si consiglia di sostituire il carattere ++";"++ con ++","++.
#### highlights.lua
@@ -211,14 +211,14 @@ Anche in questo caso è stata creata una tabella, la tabella delle `local source
```lua
local sources = {
- -- webdev stuff
- b.formatting.deno_fmt,
- b.formatting.prettier.with { filetypes = { "html", "markdown", "css" } },
- -- Lua
- b.formatting.stylua,
+ -- webdev stuff
+ b.formatting.deno_fmt,
+ b.formatting.prettier.with({ filetypes = { "html", "markdown", "css" } }),
+ -- Lua
+ b.formatting.stylua,
- -- cpp
- b.formatting.clang_format,
+ -- cpp
+ b.formatting.clang_format,
}
```
@@ -251,24 +251,24 @@ La parte del codice che si occupa di questo aspetto è la seguente:
```lua
M.treesitter = {
- ensure_installed = {
- "vim",
- "lua",
- "html",
- "css",
- "javascript",
- "typescript",
- "tsx",
- "c",
- "markdown",
- "markdown_inline",
- },
- indent = {
- enable = true,
- -- disable = {
- -- "python"
- -- },
- },
+ ensure_installed = {
+ "vim",
+ "lua",
+ "html",
+ "css",
+ "javascript",
+ "typescript",
+ "tsx",
+ "c",
+ "markdown",
+ "markdown_inline",
+ },
+ indent = {
+ enable = true,
+ -- disable = {
+ -- "python"
+ -- },
+ },
}
```
@@ -296,18 +296,18 @@ Proseguendo, il file contiene la parte relativa all'installazione dei server da
```lua
M.mason = {
- ensure_installed = {
- -- lua stuff
- "lua-language-server",
- "stylua",
-
- -- web dev stuff
- "css-lsp",
- "html-lsp",
- "typescript-language-server",
- "deno",
- "prettier"
- },
+ ensure_installed = {
+ -- lua stuff
+ "lua-language-server",
+ "stylua",
+
+ -- web dev stuff
+ "css-lsp",
+ "html-lsp",
+ "typescript-language-server",
+ "deno",
+ "prettier",
+ },
}
```
diff --git a/docs/books/nvchad/vale_nvchad.it.md b/docs/books/nvchad/vale_nvchad.it.md
index 78862cf7f4..d0683775e5 100644
--- a/docs/books/nvchad/vale_nvchad.it.md
+++ b/docs/books/nvchad/vale_nvchad.it.md
@@ -20,11 +20,11 @@ tags:
## Installazione di `vale` con Mason
-L'installazione di `vale` dall'interno di NvChad, usando Mason, manterrà il pacchetto aggiornato con pochi passi in più. L'esecuzione periodica di Mason da `nvim` mostrerà se ci sono aggiornamenti da installare e permetterà di aggiornarli da lì. Questo include `vale` una volta installato. Cominciamo con l'eseguire `nvim` per visualizzare un file vuoto e poi entriamo nella modalità di comando usando SHIFT+:+Mason, che dovrebbe mostrare un'interfaccia simile a questa:
+L'installazione di `vale` dall'interno di NvChad, usando Mason, manterrà il pacchetto aggiornato con pochi passi in più. L'esecuzione periodica di Mason da `nvim` mostrerà se ci sono aggiornamenti da installare e permetterà di aggiornarli da lì. Questo include `vale` una volta installato. Cominciamo con l'eseguire `nvim` per visualizzare un file vuoto e poi entriamo nella modalità di comando usando ++shift++ + ++":"++ + Mason, che dovrebbe mostrare un'interfaccia simile a questa:

-Invece di consultare l'intero elenco dei pacchetti, utilizziamo la voce di menu 4 per limitare l'elenco dei linters. Premete 4 e scorrete l'elenco fino a trovare `vale` e, con il cursore su quella riga, premete i per installare. Il vostro elenco dovrebbe ora mostrare `vale` installato:
+Invece di consultare l'intero elenco dei pacchetti, utilizziamo la voce di menu 4 per limitare l'elenco dei linters. Premete ++shift++ + ++":"++ + e scorrete l'elenco fino a trovare `vale` e, con il cursore su quella riga, premete ++"i"++ per installare. Il vostro elenco dovrebbe ora mostrare `vale` installato:

@@ -52,7 +52,7 @@ Se ci si trova nel percorso del binario di `vale` qui: `~/.local/share/nvim/maso
È necessario creare la cartella "styles". Per farlo, eseguire il binario `vale` con il comando `sync`. Anche in questo caso, se si sta eseguendo questa operazione dalla cartella `~/.local/share/nvim/mason/packages/vale/`, basta fare:
-```
+```bash
./vale sync
```
@@ -62,7 +62,7 @@ Una volta terminata l'operazione, verrà visualizzato quanto segue:
Copiare il file `.vale.ini` e la cartella `styles` nella radice della cartella home:
-```
+```bash
cp .vale.ini ~/
cp -rf styles ~/
```
@@ -77,7 +77,7 @@ Per prima cosa, creare il file `.vale.ini` nella cartella principale utilizzando
Quindi, eseguire il comando `vale sync.` Dal momento che ci si trova nella propria home directory, è necessario l'intero percorso del binario:
-```
+```bash
~/.local/share/nvim/mason/packages/vale/vale sync
```
@@ -85,14 +85,13 @@ Quindi, eseguire il comando `vale sync.` Dal momento che ci si trova nella prop
In questo caso, non è necessario copiare i file, poiché verranno creati nella directory principale.
-
## Modifiche al file `null-ls.lua`
È necessario un ultimo passo. È necessario modificare il file `null-ls.lua` che si trova in `~/.config/nvim/lua/custom/configs/` e aggiungere il linter `vale`.
Se non sono stati installati altri linters, creare una sezione con due trattini (commenti) chiamata "linters" e inserirvi questo codice:
-```
+```lua
b.diagnostica.vale,
```
diff --git a/docs/gemstones/RL9_network_manager.zh.md b/docs/gemstones/RL9_network_manager.zh.md
index 5000a150d8..3f4d97d6fa 100644
--- a/docs/gemstones/RL9_network_manager.zh.md
+++ b/docs/gemstones/RL9_network_manager.zh.md
@@ -33,8 +33,8 @@ shell > nmtui
* `nmcli`. 使用命令行配置网络,可以是纯命令行,也可以是交互式命令行。
```bash
-Shell > nmcli connection show
-NAME UUID TYPE DEVICE
+Shell > nmcli connection show
+NAME UUID TYPE DEVICE
ens160 25106d13-ba04-37a8-8eb9-64daa05168c9 ethernet ens160
```
@@ -138,7 +138,7 @@ Shell > nmcli connection modify CONNECTION_NAME autoconnect yes ipv6.method dhcp
例如,bonding 的0模式:
```bash
-Shell > nmcli connection add type bond con-name BOND_CONNECTION_NAME ifname BOND_NIC_DEVICE_NAME mode 0
+Shell > nmcli connection add type bond con-name BOND_CONNECTION_NAME ifname BOND_NIC_DEVICE_NAME mode 0
Shell > nmcli connection add type bond-slave ifname NIC_DEVICE_NAME1 master BOND_NIC_DEVICE_NAME
Shell > nmcli connection add type bond-slave ifname NIC_DEVICE_NAME2 master BOND_NIC_DEVICE_NAME
```
@@ -154,27 +154,27 @@ Shell > nmcli connection add type bond-slave ifname NIC_DEVICE_NAME2 mas
NetwrokManager 网卡配置文件的内容为一个 init 风格的 key 文件。 例如:
```bash
-Shell > cat /etc/NetworkManager/system-connections/ens160.nmconnection
-[connection]
-id=ens160
-uuid=5903ac99-e03f-46a8-8806-0a7a8424497e
-type=ethernet
-interface-name=ens160
-timestamp=1670056998
-
-[ethernet]
-mac-address=00:0C:29:47:68:D0
-
-[ipv4]
-address1=192.168.100.4/24,192.168.100.1
-dns=8.8.8.8;114.114.114.114;
-method=manual
-
-[ipv6]
-addr-gen-mode=default
-method=disabled
-
-[proxy]
+Shell > cat /etc/NetworkManager/system-connections/ens160.nmconnection
+[connection]
+id=ens160
+uuid=5903ac99-e03f-46a8-8806-0a7a8424497e
+type=ethernet
+interface-name=ens160
+timestamp=1670056998
+
+[ethernet]
+mac-address=00:0C:29:47:68:D0
+
+[ipv4]
+address1=192.168.100.4/24,192.168.100.1
+dns=8.8.8.8;114.114.114.114;
+method=manual
+
+[ipv6]
+addr-gen-mode=default
+method=disabled
+
+[proxy]
```
* 以 # 开头的行和空行被视为注释;
diff --git a/docs/gemstones/mtr.zh.md b/docs/gemstones/mtr.zh.md
index f4906ad9d3..e4d6c73f8b 100644
--- a/docs/gemstones/mtr.zh.md
+++ b/docs/gemstones/mtr.zh.md
@@ -1,7 +1,7 @@
---
title: mtr - 网络诊断
author: tianci li
-contributors: Steven Spencer
+contributors: Steven Spencer, Neel Chauhan
date: 2021-10-20
---
@@ -61,4 +61,11 @@ HOST: li Loss% Snt Last Avg Best Wrst StDev
* StDev - 方差(稳定性)
## 交互时的快捷键
-p - 暂停; d - 切换显示模式; n - 开/关 DNS; r - 重置所有计数器; j - 切换延迟显示信息; y - 切换IP信息; q - 退出交互.
+
+* ++p++ - 暂停
+* ++d++ - 切换显示模式
+* ++n++ - 打开或关闭 DNS
+* ++r++ - 重置所有的计数器
+* ++j++ - 切换延迟显示信息
+* ++y++ - 切换 IP 信息
+* ++q++ - 退出 `mtr`
diff --git a/docs/guides/contribute/localdocs/mkdocs_venv.it.md b/docs/guides/contribute/localdocs/mkdocs_venv.it.md
index cd29e2f5e8..64028a8f0d 100644
--- a/docs/guides/contribute/localdocs/mkdocs_venv.it.md
+++ b/docs/guides/contribute/localdocs/mkdocs_venv.it.md
@@ -259,7 +259,7 @@ INFO - [11:46:50] Watching paths for changes:
INFO - [11:46:50] Serving on http://127.0.0.1:8000/
```
-La copia del sito di documentazione sarà in esecuzione quando si aprirà il browser all'indirizzo specificato (http://1127.0.0.1:8000). La copia rispecchia perfettamente il sito online in termini di funzionalità e struttura, consentendovi di valutare l'aspetto e l'impatto che la vostra pagina avrà sul sito.
+La copia del sito di documentazione sarà in esecuzione quando si aprirà il browser all'indirizzo specificato [http://1127.0.0.1:8000](http://1127.0.0.1:8000). La copia rispecchia perfettamente il sito online in termini di funzionalità e struttura, consentendovi di valutare l'aspetto e l'impatto che la vostra pagina avrà sul sito.
MkDocs incorpora un meccanismo di controllo delle modifiche apportate ai file nella cartella specificata dal percorso `docs_dir`; l'inserimento di una nuova pagina o la modifica di una esistente in `documentation/docs` verrà automaticamente riconosciuta e produrrà una nuova creazione del sito statico.
@@ -267,7 +267,7 @@ Poiché il tempo necessario a MkDocs per costruire il sito statico può essere d
### Uscire dall'ambiente di sviluppo
-Quando la visualizzazione della nuova pagina è soddisfacente, si può uscire dall'ambiente di sviluppo. Questo comporta prima l'uscita da *MkDocs* e poi la disattivazione dell'ambiente virtuale python. Per uscire da *MkDocs* è necessario utilizzare la combinazione di tasti CTRL + C e, come visto in precedenza, per uscire dall'ambiente virtuale è necessario richiamare il comando di `deactivate`.
+Quando la visualizzazione della nuova pagina è soddisfacente, si può uscire dall'ambiente di sviluppo. Questo comporta prima l'uscita da *MkDocs* e poi la disattivazione dell'ambiente virtuale python. Per uscire da *MkDocs* è necessario utilizzare la combinazione di tasti ++ctrl++ + ++"C"++ e, come visto in precedenza, per uscire dall'ambiente virtuale è necessario richiamare il comando di `deactivate`.
```bash
...
diff --git a/docs/guides/web/caddy.it.md b/docs/guides/web/caddy.it.md
new file mode 100644
index 0000000000..61e27c1a87
--- /dev/null
+++ b/docs/guides/web/caddy.it.md
@@ -0,0 +1,240 @@
+---
+title: Server Web Caddy
+author: Neel Chauhan
+contributors: Steven Spencer
+tested_with: 9.3
+tags:
+ - web
+---
+
+# Come installare il server web Caddy più recente su Rocky Linux
+
+## Introduzione
+
+_Caddy_ è un server web progettato per le applicazioni web moderne. Caddy è semplice da configurare e dispone della funzione Let's Encrypt automatica, in modo che i vostri siti web siano sempre sicuri per impostazione predefinita. È il server web preferito dall'autore.
+
+Ecco una breve panoramica delle caratteristiche di Caddy:
+
+- Un server web di base
+- Un reverse proxy per dirigere il traffico verso più siti
+- Moduli per molti carichi di lavoro, tra cui TCP, SSH e altro ancora
+- Un bilanciatore di carico integrato per gestire il traffico verso più siti web
+- Supporto a Let's Encrypt integrato e automatizzato
+- Un'API per riconfigurare il server in modo programmatico
+- Supporto a PHP FastCGI
+- E IPv6
+
+## Prerequisiti e presupposti
+
+Sono necessari:
+
+- Una macchina o un server Rocky Linux connesso a internet.
+- Una familiarità di base con la riga di comando.
+- La possibilità di eseguire comandi come utente root o con `sudo`.
+- Un editor di testo a tua scelta, sia grafico che a riga di comando. Per questo tutorial, l'autore utilizza `vim`.
+- Un nome di dominio o un altro hostname che punta all'indirizzo IP pubblico del server.
+
+## Installazione di Caddy
+
+Innanzitutto, assicuratevi che il vostro computer disponga degli ultimi aggiornamenti:
+
+```bash
+sudo dnf update
+```
+
+Quindi, installare il repository software `epel-release`:
+
+```bash
+sudo dnf install -y epel-release
+```
+
+Quindi, installare il server web `caddy`:
+
+```bash
+sudo dnf install -y caddy
+```
+
+## Configurare il firewall
+
+Se si tenta di visualizzare una pagina Web con l'indirizzo IP o il nome di dominio della propria macchina da un altro computer, probabilmente non si otterrà nulla. Questo sarà il caso se avete un firewall attivo e funzionante.
+
+Per aprire le porte necessarie a "vedere" le pagine web, si utilizzerà il firewall integrato di Rocky Linux, `firewalld`. Il comando di `firewalld` per farlo è `firewall-cmd`.
+
+Per aprire i servizi `http` e `https`, i servizi che gestiscono le pagine web, eseguire:
+
+```bash
+sudo firewall-cmd --permanent --zone=public --add-service=http
+sudo firewall-cmd --permanent --zone=public --add-service=https
+```
+
+Per capire meglio:
+
+- L'opzione `--permanent` indica al firewall di applicare questa configurazione a ogni riavvio del firewall e al riavvio del server.
+- `--zone=public` indica al firewall di consentire le connessioni in entrata a questa porta da parte di tutti.
+- Infine, `--add-service=http` e `--add-service=https` indicano a `firewalld` di passare tutto il traffico HTTP e HTTPS al server.
+
+Queste configurazioni non avranno effetto finché non forzerete la questione. Per farlo, occorre indicare a `firewalld` di ricaricare le sue configurazioni:
+
+```bash
+sudo firewall-cmd --reload
+```
+
+!!! Note "Nota"
+
+````
+Ora, c'è una piccolissima possibilità che questo non funzioni. In questi rari casi, fate in modo che `firewalld` esegua i vostri ordini con il vecchio spegnimento-e-riaccensione.
+
+```bash
+systemctl restart firewalld
+```
+````
+
+Per garantire l'autorizzazione delle porte, eseguire `firewall-cmd --list-all`. Un firewall correttamente configurato avrà un aspetto simile a questo:
+
+```bash
+public (active)
+ target: default
+ icmp-block-inversion: no
+ interfaces: enp9s0
+ sources:
+ services: cockpit dhcpv6-client ssh http https
+ ports:
+ protocols:
+ forward: no
+ masquerade: no
+ forward-ports:
+ source-ports:
+ icmp-blocks:
+ rich rules:
+```
+
+Dovrebbe essere tutto ciò di cui avete bisogno, a livello di firewall.
+
+## Configurare Caddy
+
+A differenza dei server web tradizionali come Apache e Nginx, il formato di configurazione di Caddy è molto più semplice. Sono finiti i tempi in cui si dovevano configurare i dettagli, come il modello di threading del server web o i certificati SSL, a meno che non si volesse farlo.
+
+Per modificare il file di configurazione di Caddy:
+
+```bash
+vim /etc/caddy/Caddyfile
+```
+
+Una configurazione statica minima del server web può essere simile a questa:
+
+```bash
+example.com {
+ root * /usr/share/caddy/example.com
+ file_server
+}
+```
+
+Sostituire "example.com" con un nome di host che punta al proprio server.
+
+È inoltre necessario aggiungere un sito web nella cartella della directory "root" di Caddy. Per semplicità, aggiungete un sito web statico di una pagina:
+
+```bash
+mkdir -p /usr/share/caddy/example.com
+echo "Hi!
" >> /usr/share/caddy/example.com/index.html
+```
+
+Successivamente, attivare il servizio systemd di Caddy:
+
+```bash
+systemctl enable --now caddy
+```
+
+Entro un minuto, Caddy otterrà i certificati SSL da Let's Encrypt. A questo punto, è possibile visualizzare il sito web appena impostato in un browser:
+
+
+
+Dovrebbe avere un lucchetto SSL che dovrebbe funzionare in ogni browser moderno, e non solo, anche una valutazione A+ al [Qualys SSL Server Test](https://www.ssllabs.com/ssltest/).
+
+## Opzionale: PHP FastCGI
+
+Come accennato in precedenza, Caddy supporta il supporto FastCGI per PHP. La buona notizia è che, a differenza di Apache e Nginx, Caddy gestisce automaticamente le estensioni dei file PHP.
+
+Per installare PHP, aggiungere prima il repository Remi (nota: se si utilizza Rocky Linux 8.x, si deve sostituire 8 dopo "release-"):
+
+```bash
+dnf install https://rpms.remirepo.net/enterprise/remi-release-9.rpm
+```
+
+Successivamente, occorre installare PHP (nota: se si utilizza un'altra versione di PHP, sostituire la versione desiderata al posto di php81):
+
+```bash
+dnf install -y php81-php-fpm
+```
+
+Se sono necessari altri moduli PHP (ad esempio, GD), aggiungerli al comando precedente.
+
+Quindi, occorre configurare PHP per l'ascolto su un socket TCP:
+
+```bash
+vim /etc/opt/remi/php81/php-fpm.d/www.conf
+```
+
+Quindi, trovare la riga:
+
+```bash
+listen = /var/opt/remi/php81/run/php-fpm/www.sock
+```
+
+Sostituirla con questa:
+
+```bash
+listen = 127.0.0.1:9000
+```
+
+Quindi salvare e uscire dal file www\.conf e aprire il file Caddy:
+
+```bash
+vim /etc/caddy/Caddyfile
+```
+
+Passare al blocco server creato in precedenza:
+
+```bash
+example.com {
+ root * /usr/share/caddy/example.com
+ file_server
+}
+```
+
+Aggiungere la seguente riga dopo la riga "file_server":
+
+```bash
+ php_fastcgi 127.0.0.1:9000
+```
+
+Il blocco del server abilitato a PHP avrà questo aspetto:
+
+```bash
+example.com {
+ root * /usr/share/caddy/example.com
+ file_server
+ php_fastcgi 127.0.0.1:9000
+}
+```
+
+Quindi salvare e uscire dal Caddyfile e riavviare Caddy:
+
+```bash
+systemctl restart caddy
+```
+
+Per verificare se PHP funziona, aggiungiamo un semplice file PHP:
+
+```bash
+echo "" >> /usr/share/caddy/rockyexample.duckdns.org/phpinfo.php
+```
+
+Aprite il vostro browser sul file creato e vi verranno presentate le informazioni su PHP:
+
+
+
+## Conclusione
+
+L'installazione e configurazione di base di Caddy è incredibilmente facile. Sono finiti i tempi in cui si passavano ore a configurare Apache. Sì, Nginx è certamente un miglioramento, ma manca ancora di funzionalità moderne ma essenziali come Let's Encrypt e il supporto per Kubernetes ingress che Caddy integra, mentre su Nginx (e Apache) è necessario aggiungerle separatamente.
+
+Uso Caddy dal 2019 come server web di riferimento ed è davvero ottimo. In effetti, ogni volta che ho a che fare con Apache, Nginx o IIS, è quasi come prendere una macchina del tempo e tornare al 2010 o prima.