diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md b/sources/tech/RHCSA Series/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md
deleted file mode 100644
index f3de8528fc..0000000000
--- a/sources/tech/RHCSA Series/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md
+++ /dev/null
@@ -1,256 +0,0 @@
-FSSlc translating
-
-RHCSA Series: Editing Text Files with Nano and Vim / Analyzing text with grep and regexps – Part 4
-================================================================================
-Every system administrator has to deal with text files as part of his daily responsibilities. That includes editing existing files (most likely configuration files), or creating new ones. It has been said that if you want to start a holy war in the Linux world, you can ask sysadmins what their favorite text editor is and why. We are not going to do that in this article, but will present a few tips that will be helpful to use two of the most widely used text editors in RHEL 7: nano (due to its simplicity and easiness of use, specially to new users), and vi/m (due to its several features that convert it into more than a simple editor). I am sure that you can find many more reasons to use one or the other, or perhaps some other editor such as emacs or pico. It’s entirely up to you.
-
-
-
-RHCSA: Editing Text Files with Nano and Vim – Part 4
-
-### Editing Files with Nano Editor ###
-
-To launch nano, you can either just type nano at the command prompt, optionally followed by a filename (in this case, if the file exists, it will be opened in edition mode). If the file does not exist, or if we omit the filename, nano will also be opened in edition mode but will present a blank screen for us to start typing:
-
-
-
-Nano Editor
-
-As you can see in the previous image, nano displays at the bottom of the screen several functions that are available via the indicated shortcuts (^, aka caret, indicates the Ctrl key). To name a few of them:
-
-- Ctrl + G: brings up the help menu with a complete list of functions and descriptions:Ctrl + X: exits the current file. If changes have not been saved, they are discarded.
-- Ctrl + R: lets you choose a file to insert its contents into the present file by specifying a full path.
-
-
-
-Nano Editor Help Menu
-
-- Ctrl + O: saves changes made to a file. It will let you save the file with the same name or a different one. Then press Enter to confirm.
-
-
-
-Nano Editor Save Changes Mode
-
-- Ctrl + X: exits the current file. If changes have not been saved, they are discarded.
-- Ctrl + R: lets you choose a file to insert its contents into the present file by specifying a full path.
-
-
-
-Nano: Insert File Content to Parent File
-
-will insert the contents of /etc/passwd into the current file.
-
-- Ctrl + K: cuts the current line.
-- Ctrl + U: paste.
-- Ctrl + C: cancels the current operation and places you at the previous screen.
-
-To easily navigate the opened file, nano provides the following features:
-
-- Ctrl + F and Ctrl + B move the cursor forward or backward, whereas Ctrl + P and Ctrl + N move it up or down one line at a time, respectively, just like the arrow keys.
-- Ctrl + space and Alt + space move the cursor forward and backward one word at a time.
-
-Finally,
-
-- Ctrl + _ (underscore) and then entering X,Y will take you precisely to Line X, column Y, if you want to place the cursor at a specific place in the document.
-
-
-
-Navigate to Line Numbers in Nano
-
-The example above will take you to line 15, column 14 in the current document.
-
-If you can recall your early Linux days, specially if you came from Windows, you will probably agree that starting off with nano is the best way to go for a new user.
-
-### Editing Files with Vim Editor ###
-
-Vim is an improved version of vi, a famous text editor in Linux that is available on all POSIX-compliant *nix systems, such as RHEL 7. If you have the chance and can install vim, go ahead; if not, most (if not all) the tips given in this article should also work.
-
-One of vim’s distinguishing features is the different modes in which it operates:
-
-
-- Command mode will allow you to browse through the file and enter commands, which are brief and case-sensitive combinations of one or more letters. If you need to repeat one of them a certain number of times, you can prefix it with a number (there are only a few exceptions to this rule). For example, yy (or Y, short for yank) copies the entire current line, whereas 4yy (or 4Y) copies the entire current line along with the next three lines (4 lines in total).
-- In ex mode, you can manipulate files (including saving a current file and running outside programs or commands). To enter ex mode, we must type a colon (:) starting from command mode (or in other words, Esc + :), directly followed by the name of the ex-mode command that you want to use.
-- In insert mode, which is accessed by typing the letter i, we simply enter text. Most keystrokes result in text appearing on the screen.
-- We can always enter command mode (regardless of the mode we’re working on) by pressing the Esc key.
-
-Let’s see how we can perform the same operations that we outlined for nano in the previous section, but now with vim. Don’t forget to hit the Enter key to confirm the vim command!
-
-To access vim’s full manual from the command line, type :help while in command mode and then press Enter:
-
-
-
-vim Edito Help Menu
-
-The upper section presents an index list of contents, with defined sections dedicated to specific topics about vim. To navigate to a section, place the cursor over it and press Ctrl + ] (closing square bracket). Note that the bottom section displays the current file.
-
-1. To save changes made to a file, run any of the following commands from command mode and it will do the trick:
-
- :wq!
- :x!
- ZZ (yes, double Z without the colon at the beginning)
-
-2. To exit discarding changes, use :q!. This command will also allow you to exit the help menu described above, and return to the current file in command mode.
-
-3. Cut N number of lines: type Ndd while in command mode.
-
-4. Copy M number of lines: type Myy while in command mode.
-
-5. Paste lines that were previously cutted or copied: press the P key while in command mode.
-
-6. To insert the contents of another file into the current one:
-
- :r filename
-
-For example, to insert the contents of `/etc/fstab`, do:
-
-
-
-Insert Content of File in vi Editor
-
-7. To insert the output of a command into the current document:
-
- :r! command
-
-For example, to insert the date and time in the line below the current position of the cursor:
-
-
-
-Insert Time an Date in vi Editor
-
-In another article that I wrote for, ([Part 2 of the LFCS series][1]), I explained in greater detail the keyboard shortcuts and functions available in vim. You may want to refer to that tutorial for further examples on how to use this powerful text editor.
-
-### Analyzing Text with Grep and Regular Expressions ###
-
-By now you have learned how to create and edit files using nano or vim. Say you become a text editor ninja, so to speak – now what? Among other things, you will also need how to search for regular expressions inside text.
-
-A regular expression (also known as “regex” or “regexp“) is a way of identifying a text string or pattern so that a program can compare the pattern against arbitrary text strings. Although the use of regular expressions along with grep would deserve an entire article on its own, let us review the basics here:
-
-**1. The simplest regular expression is an alphanumeric string (i.e., the word “svm”) or two (when two are present, you can use the | (OR) operator):**
-
- # grep -Ei 'svm|vmx' /proc/cpuinfo
-
-The presence of either of those two strings indicate that your processor supports virtualization:
-
-
-
-Regular Expression Example
-
-**2. A second kind of a regular expression is a range list, enclosed between square brackets.**
-
-For example, `c[aeiou]t` matches the strings cat, cet, cit, cot, and cut, whereas `[a-z]` and `[0-9]` match any lowercase letter or decimal digit, respectively. If you want to repeat the regular expression X certain number of times, type `{X}` immediately following the regexp.
-
-For example, let’s extract the UUIDs of storage devices from `/etc/fstab`:
-
- # grep -Ei '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' -o /etc/fstab
-
-
-
-Extract String from a File
-
-The first expression in brackets `[0-9a-f]` is used to denote lowercase hexadecimal characters, and `{8}` is a quantifier that indicates the number of times that the preceding match should be repeated (the first sequence of characters in an UUID is a 8-character long hexadecimal string).
-
-The parentheses, the `{4}` quantifier, and the hyphen indicate that the next sequence is a 4-character long hexadecimal string, and the quantifier that follows `({3})` denote that the expression should be repeated 3 times.
-
-Finally, the last sequence of 12-character long hexadecimal string in the UUID is retrieved with `[0-9a-f]{12}`, and the -o option prints only the matched (non-empty) parts of the matching line in /etc/fstab.
-
-**3. POSIX character classes.**
-
-注:表格
-
-
-
-
-
-| Character Class |
-Matches… |
-
-
-| [[:alnum:]] |
- Any alphanumeric [a-zA-Z0-9] character |
-
-
-| [[:alpha:]] |
- Any alphabetic [a-zA-Z] character |
-
-
-| [[:blank:]] |
- Spaces or tabs |
-
-
-| [[:cntrl:]] |
- Any control characters (ASCII 0 to 32) |
-
-
-| [[:digit:]] |
- Any numeric digits [0-9] |
-
-
-| [[:graph:]] |
- Any visible characters |
-
-
-| [[:lower:]] |
- Any lowercase [a-z] character |
-
-
-| [[:print:]] |
- Any non-control characters |
-
-
-| [[:space:]] |
- Any whitespace |
-
-
-| [[:punct:]] |
- Any punctuation marks |
-
-
-| [[:upper:]] |
- Any uppercase [A-Z] character |
-
-
-| [[:xdigit:]] |
- Any hex digits [0-9a-fA-F] |
-
-
-| [:word:] |
- Any letters, numbers, and underscores [a-zA-Z0-9_] |
-
-
-
-
-For example, we may be interested in finding out what the used UIDs and GIDs (refer to [Part 2][2] of this series to refresh your memory) are for real users that have been added to our system. Thus, we will search for sequences of 4 digits in /etc/passwd:
-
- # grep -Ei [[:digit:]]{4} /etc/passwd
-
-
-
-Search For a String in File
-
-The above example may not be the best case of use of regular expressions in the real world, but it clearly illustrates how to use POSIX character classes to analyze text along with grep.
-
-### Conclusion ###
-
-In this article we have provided some tips to make the most of nano and vim, two text editors for the command-line users. Both tools are supported by extensive documentation, which you can consult in their respective official web sites (links given below) and using the suggestions given in [Part 1][3] of this series.
-
-#### Reference Links ####
-
-- [http://www.nano-editor.org/][4]
-- [http://www.vim.org/][5]
-
---------------------------------------------------------------------------------
-
-via: http://www.tecmint.com/rhcsa-exam-how-to-use-nano-vi-editors/
-
-作者:[Gabriel Cánepa][a]
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:http://www.tecmint.com/author/gacanepa/
-[1]:http://www.tecmint.com/vi-editor-usage/
-[2]:http://www.tecmint.com/file-and-directory-management-in-linux/
-[3]:http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/
-[4]:http://www.nano-editor.org/
-[5]:http://www.vim.org/
diff --git a/translated/tech/RHCSA/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md b/translated/tech/RHCSA/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md
new file mode 100644
index 0000000000..8438ec0351
--- /dev/null
+++ b/translated/tech/RHCSA/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md
@@ -0,0 +1,258 @@
+RHCSA 系列:使用 Nano 和 Vim 编辑文本文件/使用 grep 和 regexps 分析文本 – Part 4
+================================================================================
+作为系统管理员的日常职责的一部分,每个系统管理员都必须处理文本文件,这包括编辑现存文件(大多可能是配置文件),或创建新的文件。有这样一个说法,假如你想在 Linux 世界中挑起一场圣战,你可以询问系统管理员们,什么是他们最喜爱的编辑器以及为什么。在这篇文章中,我们并不打算那样做,但我们将向你呈现一些技巧,这些技巧对使用两款在 RHEL 7 中最为常用的文本编辑器: nano(由于其简单和易用,特别是对于新手来说) 和 vi/m(由于其自身的几个特色使得它不仅仅是一个简单的编辑器)来说都大有裨益。我确信你可以找到更多的理由来使用其中的一个或另一个,或许其他的一些编辑器如 emacs 或 pico。这完全取决于你。
+
+
+
+RHCSA: 使用 Nano 和 Vim 编辑文本文件 – Part 4
+
+### 使用 Nano 编辑器来编辑文件 ###
+
+要启动 nano,你可以在命令提示符下输入 `nano`,或选择性地跟上一个文件名(在这种情况下,若文件存在,它将在编辑模式中被打开)。若文件不存在,或我们省略了文件名, nano 也将在 编辑模式下开启,但将为我们开启一个空白屏以便开始输入:
+
+
+
+Nano 编辑器
+
+正如你在上一张图片中所见的那样, nano 在屏幕的底部呈现出一些功能,它们可以通过暗指的快捷键来触发(^,即插入记号,代指 Ctrl 键)。它们中的一些是:
+
+- Ctrl + G: 触发一个帮助菜单,带有一个关于功能和相应的描述的完整列表;
+- Ctrl + X: 离开当前文件,假如更改没有被保存,则它们将被丢弃;
+- Ctrl + R: 通过指定一个完整的文件路径,让你选择一个文件来将该文件的内容插入到当前文件中;
+
+
+
+Nano 编辑器帮助菜单
+
+- Ctrl + O: 保存更改到一个文件。它将让你用一个与源文件相同或不同的名称来保存该文件,然后按 Enter 键来确认。
+
+
+
+Nano 编辑器的保存更改模式
+
+- Ctrl + X: 离开当前文件,假如更改没有被保存,则它们将被丢弃;
+- Ctrl + R: 通过指定一个完整的文件路径,让你选择一个文件来将该文件的内容插入到当前文件中;
+
+
+
+Nano: 插入文件内容到主文件中
+
+上图的操作将把 `/etc/passwd` 的内容插入到当前文件中。
+
+- Ctrl + K: 剪切当前行;
+- Ctrl + U: 粘贴;
+- Ctrl + C: 取消当前的操作并返回先前的屏幕;
+
+为了轻松地在打开的文件中浏览, nano 提供了下面的功能:
+
+- Ctrl + F 和 Ctrl + B 分别先前或向后移动光标;而 Ctrl + P 和 Ctrl + N 则分别向上或向下移动一行,功能与箭头键相同;
+- Ctrl + space 和 Alt + space 分别向前或向后移动一个单词;
+
+最后,
+
+- 假如你想将光标移动到文档中的特定位置,使用 Ctrl + _ (下划线) 并接着输入 X,Y 将准确地带你到 第 X 行,第 Y 列。
+
+
+
+在 nano 中定位到具体的行和列
+
+上面的例子将带你到当前文档的第 15 行,第 14 列。
+
+假如你可以回忆起你早期的 Linux 岁月,特别是当你刚从 Windows 迁移到 Linux 中,你就可能会同意:对于一个新手来说,使用 nano 来开始学习是最好的方式。
+
+### 使用 Vim 编辑器来编辑文件 ###
+
+
+Vim 是 vi 的加强版本,它是 Linux 中一个著名的文本编辑器,可在所有兼容 POSIX 的 *nix 系统中获取到,例如在 RHEL 7 中。假如你有机会并可以安装 Vim,请继续;假如不能,这篇文章中的大多数(若不是全部)的提示也应该可以正常工作。
+
+Vim 的一个出众的特点是可以在多个不同的模式中进行操作:
+
+- 命令模式将允许你在文件中跳转和输入命令,这些命令是由一个或多个字母组成的简洁且对大小写敏感的组合。假如你想重复执行某个命令特定次,你可以在这个命令前加上需要重复的次数(这个规则只有极少数例外)。例如, yy(或 Y,yank 的缩写)可以复制整个当前行,而 4yy(或 4Y)则复制整个当前行到接着的 3 行(总共 4 行)。
+- 在 ex 模式中,你可以操作文件(包括保存当前文件和运行外部的程序或命令)。要进入 ex 模式,你必须在命令模式前(或其他词前,Esc + :)输入一个冒号(:),再直接跟上你想使用的 ex 模式命令的名称。
+- 对于插入模式,可以输入字母 i 进入,我们只需要输入文字即可。大多数的键击结果都将出现在屏幕中的文本中。
+- 我们总是可以通过敲击 Esc 键来进入命令模式(无论我们正工作在哪个模式下)。
+
+现在,让我们看看如何在 vim 中执行在上一节列举的针对 nano 的相同的操作。不要忘记敲击 Enter 键来确认 vim 命令。
+
+为了从命令行中获取 vim 的完整手册,在命令模式下键入 `:help` 并敲击 Enter 键:
+
+
+
+vim 编辑器帮助菜单
+
+上面的小节呈现出一个目录列表,而定义过的小节则主要关注 Vim 的特定话题。要浏览某一个小节,可以将光标放到它的上面,然后按 Ctrl + ] (闭方括号)。注意,底部的小节展示的是当前文件的内容。
+
+1. 要保存更改到文件,在命令模式中运行下面命令中的任意一个,就可以达到这个目的:
+
+```
+:wq!
+:x!
+ZZ (是的,两个 ZZ,前面无需添加冒号)
+```
+
+2. 要离开并丢弃更改,使用 `:q!`。这个命令也将允许你离开上面描述过的帮助菜单,并返回到命令模式中的当前文件。
+
+3. 剪切 N 行:在命令模式中键入 `Ndd`。
+
+4. 复制 M 行:在命令模式中键入 `Myy`。
+
+5. 粘贴先前剪贴或复制过的行:在命令模式中按 `P`键。
+
+6. 要插入另一个文件的内容到当前文件:
+
+ :r filename
+
+例如,插入 `/etc/fstab` 的内容,可以这样做:
+
+[在 vi 编辑器中插入文件的内容](http://www.tecmint.com/wp-content/uploads/2015/03/Insert-Content-vi-Editor.png)
+
+在 vi 编辑器中插入文件的内容
+
+7. 插入一个命名的输出到当前文档:
+
+ :r! command
+
+例如,要在光标所在的当前位置后面插入日期和时间:
+
+
+
+在 vi 编辑器中插入时间和日期
+
+在另一篇我写的文章中,([LFCS 系列的 Part 2][1]),我更加详细地解释了在 vim 中可用的键盘快捷键和功能。或许你可以参考那个教程来查看如何使用这个强大的文本编辑器的更深入的例子。
+
+### 使用 Grep 和正则表达式来分析文本 ###
+
+到现在为止,你已经学习了如何使用 nano 或 vim 创建和编辑文件。打个比方说,假如你成为了一个文本编辑器忍者 – 那又怎样呢? 在其他事情上,你也需要知道如何在文本中搜索正则表达式。
+
+正则表达式(也称为 "regex" 或 "regexp") 是一种识别一个特定文本字符串或模式的方式,使得一个程序可以将这个模式和任意的文本字符串相比较。尽管利用 grep 来使用正则表达式值得用一整篇文章来描述,这里就让我们复习一些基本的知识:
+
+**1. 最简单的正则表达式是一个由数字和字母构成的字符串(即,单词 "svm") 或两个(在使用两个字符串时,你可以使用 `|`(或) 操作符):**
+
+ # grep -Ei 'svm|vmx' /proc/cpuinfo
+
+上面命令的输出结果中若有这两个字符串之一的出现,则标志着你的处理器支持虚拟化:
+
+
+
+正则表达式示例
+
+**2. 第二种正则表达式是一个范围列表,由方括号包裹。**
+
+例如, `c[aeiou]t` 匹配字符串 cat,cet,cit,cot 和 cut,而 `[a-z]` 和 `[0-9]` 则相应地匹配小写字母或十进制数字。假如你想重复正则表达式 X 次,在正则表达式的后面立即输入 `{X}`即可。
+
+例如,让我们从 `/etc/fstab` 中析出存储设备的 UUID:
+
+ # grep -Ei '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' -o /etc/fstab
+
+
+
+从一个文件中析出字符串
+
+方括号中的第一个表达式 `[0-9a-f]` 被用来表示小写的十六进制字符,`{8}`是一个量词,暗示前面匹配的字符串应该重复的次数(在一个 UUID 中的开头序列是一个 8 个字符长的十六进制字符串)。
+
+在圆括号中,量词 `{4}`和连字符暗示下一个序列是一个 4 个字符长的十六进制字符串,接着的量词 `({3})`表示前面的表达式要重复 3 次。
+
+最后,在 UUID 中的最后一个 12 个字符长的十六进制字符串可以由 `[0-9a-f]{12}` 取得, `-o` 选项表示只打印出在 `/etc/fstab`中匹配行中的匹配的(非空)部分。
+
+**3. POSIX 字符类 **
+
+注:表格
+
+
+
+
+
+| 字符类 |
+匹配 … |
+
+
+| [[:alnum:]] |
+ 任意字母或数字 [a-zA-Z0-9] |
+
+
+| [[:alpha:]] |
+ 任意字母 [a-zA-Z] |
+
+
+| [[:blank:]] |
+ 空格或制表符 |
+
+
+| [[:cntrl:]] |
+ 任意控制字符 (ASCII 码的 0 至 32) |
+
+
+| [[:digit:]] |
+ 任意数字 [0-9] |
+
+
+| [[:graph:]] |
+ 任意可见字符 |
+
+
+| [[:lower:]] |
+ 任意小写字母 [a-z] |
+
+
+| [[:print:]] |
+ 任意非控制字符 |
+ |
+
+| [[:space:]] |
+ 任意空格 |
+
+
+| [[:punct:]] |
+ 任意标点字符 |
+
+
+| [[:upper:]] |
+ 任意大写字母 [A-Z] |
+
+
+| [[:xdigit:]] |
+ 任意十六进制数字 [0-9a-fA-F] |
+
+
+| [:word:] |
+ 任意字母,数字和下划线 [a-zA-Z0-9_] |
+
+
+
+
+例如,我们可能会对查找已添加到我们系统中给真实用户的 UID 和 GID(参考这个系列的 [Part 2][2]来回忆起这些知识)感兴趣。那么,我们将在 `/etc/passwd` 文件中查找 4 个字符长的序列:
+
+ # grep -Ei [[:digit:]]{4} /etc/passwd
+
+
+
+在文件中查找一个字符串
+
+上面的示例可能不是真实世界中使用正则表达式的最好案例,但它清晰地启发了我们如何使用 POSIX 字符类来使用 grep 分析文本。
+
+### 总结 ###
+
+
+在这篇文章中,我们已经提供了一些技巧来最大地利用针对命令行用户的两个文本编辑器 nano 和 vim,这两个工具都有相关的扩展文档可供阅读,你可以分别查询它们的官方网站(链接在下面给出)以及使用这个系列中的 [Part 1][3] 给出的建议。
+
+#### 参考文件链接 ####
+
+- [http://www.nano-editor.org/][4]
+- [http://www.vim.org/][5]
+
+--------------------------------------------------------------------------------
+
+via: http://www.tecmint.com/rhcsa-exam-how-to-use-nano-vi-editors/
+
+作者:[Gabriel Cánepa][a]
+译者:[FSSlc](https://github.com/FSSlc)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://www.tecmint.com/author/gacanepa/
+[1]:http://www.tecmint.com/vi-editor-usage/
+[2]:http://www.tecmint.com/file-and-directory-management-in-linux/
+[3]:http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/
+[4]:http://www.nano-editor.org/
+[5]:http://www.vim.org/