diff --git a/translated/tech/20180806 Anatomy of a Linux DNS Lookup - Part IV.md b/published/20180806 Anatomy of a Linux DNS Lookup - Part IV.md
similarity index 77%
rename from translated/tech/20180806 Anatomy of a Linux DNS Lookup - Part IV.md
rename to published/20180806 Anatomy of a Linux DNS Lookup - Part IV.md
index 9f3dd93437..e2f893b210 100644
--- a/translated/tech/20180806 Anatomy of a Linux DNS Lookup - Part IV.md
+++ b/published/20180806 Anatomy of a Linux DNS Lookup - Part IV.md
@@ -16,12 +16,8 @@ Linux DNS 查询剖析(第四部分)
在第四部分中,我将介绍容器如何完成 DNS 查询。你想的没错,也不是那么简单。
-* * *
-
### 1) Docker 和 DNS
-============================================================
-
在 [Linux DNS 查询剖析(第三部分)][3] 中,我们介绍了 `dnsmasq`,其工作方式如下:将 DNS 查询指向到 localhost 地址 `127.0.0.1`,同时启动一个进程监听 `53` 端口并处理查询请求。
在按上述方式配置 DNS 的主机上,如果运行了一个 Docker 容器,容器内的 `/etc/resolv.conf` 文件会是怎样的呢?
@@ -72,29 +68,29 @@ google.com. 112 IN A 172.217.23.14
在这个问题上,Docker 的解决方案是忽略所有可能的复杂情况,即无论主机中使用什么 DNS 服务器,容器内都使用 Google 的 DNS 服务器 `8.8.8.8` 和 `8.8.4.4` 完成 DNS 查询。
- _我的经历:在 2013 年,我遇到了使用 Docker 以来的第一个问题,与 Docker 的这种 DNS 解决方案密切相关。我们公司的网络屏蔽了 `8.8.8.8` 和 `8.8.4.4`,导致容器无法解析域名。_
+_我的经历:在 2013 年,我遇到了使用 Docker 以来的第一个问题,与 Docker 的这种 DNS 解决方案密切相关。我们公司的网络屏蔽了 `8.8.8.8` 和 `8.8.4.4`,导致容器无法解析域名。_
-这就是 Docker 容器的情况,但对于包括 Kubernetes 在内的容器 _编排引擎_,情况又有些不同。
+这就是 Docker 容器的情况,但对于包括 Kubernetes 在内的容器 编排引擎,情况又有些不同。
### 2) Kubernetes 和 DNS
-在 Kubernetes 中,最小部署单元是 `pod`;`pod` 是一组相互协作的容器,共享 IP 地址(和其它资源)。
+在 Kubernetes 中,最小部署单元是 pod;它是一组相互协作的容器,共享 IP 地址(和其它资源)。
Kubernetes 面临的一个额外的挑战是,将 Kubernetes 服务请求(例如,`myservice.kubernetes.io`)通过对应的解析器,转发到具体服务地址对应的内网地址。这里提到的服务地址被称为归属于“集群域”。集群域可由管理员配置,根据配置可以是 `cluster.local` 或 `myorg.badger` 等。
-在 Kubernetes 中,你可以为 `pod` 指定如下四种 `pod` 内 DNS 查询的方式。
+在 Kubernetes 中,你可以为 pod 指定如下四种 pod 内 DNS 查询的方式。
-* Default
+**Default**
-在这种(名称容易让人误解)的方式中,`pod` 与其所在的主机采用相同的 DNS 查询路径,与前面介绍的主机 DNS 查询一致。我们说这种方式的名称容易让人误解,因为该方式并不是默认选项!`ClusterFirst` 才是默认选项。
+在这种(名称容易让人误解)的方式中,pod 与其所在的主机采用相同的 DNS 查询路径,与前面介绍的主机 DNS 查询一致。我们说这种方式的名称容易让人误解,因为该方式并不是默认选项!`ClusterFirst` 才是默认选项。
如果你希望覆盖 `/etc/resolv.conf` 中的条目,你可以添加到 `kubelet` 的配置中。
-* ClusterFirst
+**ClusterFirst**
在 `ClusterFirst` 方式中,遇到 DNS 查询请求会做有选择的转发。根据配置的不同,有以下两种方式:
-第一种方式配置相对古老但更简明,即采用一个规则:如果请求的域名不是集群域的子域,那么将其转发到 `pod` 所在的主机。
+第一种方式配置相对古老但更简明,即采用一个规则:如果请求的域名不是集群域的子域,那么将其转发到 pod 所在的主机。
第二种方式相对新一些,你可以在内部 DNS 中配置选择性转发。
@@ -115,27 +111,27 @@ data:
在 `stubDomains` 条目中,可以为特定域名指定特定的 DNS 服务器;而 `upstreamNameservers` 条目则给出,待查询域名不是集群域子域情况下用到的 DNS 服务器。
-这是通过在一个 `pod` 中运行我们熟知的 `dnsmasq` 实现的。
+这是通过在一个 pod 中运行我们熟知的 `dnsmasq` 实现的。

剩下两种选项都比较小众:
-* ClusterFirstWithHostNet
+**ClusterFirstWithHostNet**
-适用于 `pod` 使用主机网络的情况,例如绕开 Docker 网络配置,直接使用与 `pod` 对应主机相同的网络。
+适用于 pod 使用主机网络的情况,例如绕开 Docker 网络配置,直接使用与 pod 对应主机相同的网络。
-* None
+**None**
`None` 意味着不改变 DNS,但强制要求你在 `pod` 规范文件的 `dnsConfig` 条目中指定 DNS 配置。
### CoreDNS 即将到来
-除了上面提到的那些,一旦 `CoreDNS` 取代Kubernetes 中的 `kube-dns`,情况还会发生变化。`CoreDNS` 相比 `kube-dns` 具有可配置性更高、效率更高等优势。
+除了上面提到的那些,一旦 `CoreDNS` 取代 Kubernetes 中的 `kube-dns`,情况还会发生变化。`CoreDNS` 相比 `kube-dns` 具有可配置性更高、效率更高等优势。
如果想了解更多,参考[这里][5]。
-如果你对 OpenShift 的网络感兴趣,我曾写过一篇[文章][6]可供你参考。但文章中 OpenShift 的版本是 `3.6`,可能有些过时。
+如果你对 OpenShift 的网络感兴趣,我曾写过一篇[文章][6]可供你参考。但文章中 OpenShift 的版本是 3.6,可能有些过时。
### 第四部分总结
@@ -152,14 +148,14 @@ via: https://zwischenzugs.com/2018/08/06/anatomy-of-a-linux-dns-lookup-part-iv/
作者:[zwischenzugs][a]
译者:[pinewall](https://github.com/pinewall)
-校对:[校对者ID](https://github.com/校对者ID)
+校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://zwischenzugs.com/
-[1]:https://zwischenzugs.com/2018/06/08/anatomy-of-a-linux-dns-lookup-part-i/
-[2]:https://zwischenzugs.com/2018/06/18/anatomy-of-a-linux-dns-lookup-part-ii/
-[3]:https://zwischenzugs.com/2018/07/06/anatomy-of-a-linux-dns-lookup-part-iii/
+[1]:https://linux.cn/article-9943-1.html
+[2]:https://linux.cn/article-9949-1.html
+[3]:https://linux.cn/article-9972-1.html
[4]:https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/#impacts-on-pods
[5]:https://coredns.io/
[6]:https://zwischenzugs.com/2017/10/21/openshift-3-6-dns-in-pictures/
diff --git a/translated/tech/20180918 How To Force APT Package Manager To Use IPv4 In Ubuntu 16.04.md b/published/20180918 How To Force APT Package Manager To Use IPv4 In Ubuntu 16.04.md
similarity index 66%
rename from translated/tech/20180918 How To Force APT Package Manager To Use IPv4 In Ubuntu 16.04.md
rename to published/20180918 How To Force APT Package Manager To Use IPv4 In Ubuntu 16.04.md
index 02bc39addc..36c159ac16 100644
--- a/translated/tech/20180918 How To Force APT Package Manager To Use IPv4 In Ubuntu 16.04.md
+++ b/published/20180918 How To Force APT Package Manager To Use IPv4 In Ubuntu 16.04.md
@@ -3,7 +3,7 @@

-**APT**, 是 **A** dvanced **P** ackage **T** ool 的缩写,是基于 Debian 的系统的默认包管理器。我们可以使用 APT 安装、更新、升级和删除应用程序。最近,我一直遇到一个奇怪的错误。每当我尝试更新我的 Ubuntu 16.04 时,我都会收到此错误 - **“0% [Connecting to in.archive.ubuntu.com (2001:67c:1560:8001::14)]”** ,同时更新流程会卡住很长时间。我的网络连接没问题,我可以 ping 通所有网站,包括 Ubuntu 官方网站。在搜索了一番谷歌后,我意识到 Ubuntu 镜像有时无法通过 IPv6 访问。在我强制将 APT 包管理器在更新系统时使用 IPv4 代替 IPv6 访问 Ubuntu 镜像后,此问题得以解决。如果你遇到过此错误,可以按照以下说明解决。
+**APT**, 是 **A** dvanced **P** ackage **T** ool 的缩写,是基于 Debian 的系统的默认包管理器。我们可以使用 APT 安装、更新、升级和删除应用程序。最近,我一直遇到一个奇怪的错误。每当我尝试更新我的 Ubuntu 16.04 时,我都会收到此错误 - **“0% [Connecting to in.archive.ubuntu.com (2001:67c:1560:8001::14)]”** ,同时更新流程会卡住很长时间。我的网络连接没问题,我可以 ping 通所有网站,包括 Ubuntu 官方网站。在搜索了一番谷歌后,我意识到 Ubuntu 镜像站点有时无法通过 IPv6 访问。在我强制将 APT 包管理器在更新系统时使用 IPv4 代替 IPv6 访问 Ubuntu 镜像站点后,此问题得以解决。如果你遇到过此错误,可以按照以下说明解决。
### 强制 APT 包管理器在 Ubuntu 16.04 中使用 IPv4
@@ -11,13 +11,12 @@
```
$ sudo apt-get -o Acquire::ForceIPv4=true update
-
$ sudo apt-get -o Acquire::ForceIPv4=true upgrade
```
瞧!这次更新很快就完成了。
-你还可以使用以下命令在 **/etc/apt/apt.conf.d/99force-ipv4** 中添加以下行,以便将来对所有 **apt-get** 事务保持持久性:
+你还可以使用以下命令在 `/etc/apt/apt.conf.d/99force-ipv4` 中添加以下行,以便将来对所有 `apt-get` 事务保持持久性:
```
$ echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4
@@ -25,7 +24,7 @@ $ echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4
**免责声明:**
-我不知道最近是否有人遇到这个问题,但我今天在我的 Ubuntu 16.04 LTS 虚拟机中遇到了至少四五次这样的错误,我按照上面的说法解决了这个问题。我不确定这是推荐的解决方案。请浏览 Ubuntu 论坛来确保此方法合法。由于我只是一个 VM,我只将它用于测试和学习目的,我不介意这种方法的真实性。请自行承担使用风险。
+我不知道最近是否有人遇到这个问题,但我今天在我的 Ubuntu 16.04 LTS 虚拟机中遇到了至少四、五次这样的错误,我按照上面的说法解决了这个问题。我不确定这是推荐的解决方案。请浏览 Ubuntu 论坛来确保此方法合法。由于我只是一个 VM,我只将它用于测试和学习目的,我不介意这种方法的真实性。请自行承担使用风险。
希望这有帮助。还有更多的好东西。敬请关注!
@@ -40,7 +39,7 @@ via: https://www.ostechnix.com/how-to-force-apt-package-manager-to-use-ipv4-in-u
作者:[SK][a]
选题:[lujun9972](https://github.com/lujun9972)
译者:[geekpi](https://github.com/geekpi)
-校对:[校对者ID](https://github.com/校对者ID)
+校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
diff --git a/sources/talk/20180123 Moving to Linux from dated Windows machines.md b/sources/talk/20180123 Moving to Linux from dated Windows machines.md
index 74bf66df68..6acd6e53f2 100644
--- a/sources/talk/20180123 Moving to Linux from dated Windows machines.md
+++ b/sources/talk/20180123 Moving to Linux from dated Windows machines.md
@@ -1,4 +1,3 @@
-translating by leowang
Moving to Linux from dated Windows machines
======
diff --git a/sources/talk/20180127 Write Dumb Code.md b/sources/talk/20180127 Write Dumb Code.md
index 505e8198df..acc647b0e5 100644
--- a/sources/talk/20180127 Write Dumb Code.md
+++ b/sources/talk/20180127 Write Dumb Code.md
@@ -1,5 +1,3 @@
-translating by ynmlml
-
Write Dumb Code
======
The best way you can contribute to an open source project is to remove lines of code from it. We should endeavor to write code that a novice programmer can easily understand without explanation or that a maintainer can understand without significant time investment.
diff --git a/sources/talk/20180308 20 questions DevOps job candidates should be prepared to answer.md b/sources/talk/20180308 20 questions DevOps job candidates should be prepared to answer.md
index b862ce311e..da43855266 100644
--- a/sources/talk/20180308 20 questions DevOps job candidates should be prepared to answer.md
+++ b/sources/talk/20180308 20 questions DevOps job candidates should be prepared to answer.md
@@ -1,4 +1,4 @@
-Translating by FelixYFZ 20 questions DevOps job candidates should be prepared to answer
+20 questions DevOps job candidates should be prepared to answer
======

diff --git a/sources/talk/20180410 Microservices Explained.md b/sources/talk/20180410 Microservices Explained.md
index 5a2151a00b..1d7e946a12 100644
--- a/sources/talk/20180410 Microservices Explained.md
+++ b/sources/talk/20180410 Microservices Explained.md
@@ -1,4 +1,3 @@
-(translating by runningwater)
Microservices Explained
======
diff --git a/sources/talk/20180419 3 tips for organizing your open source project-s workflow on GitHub.md b/sources/talk/20180419 3 tips for organizing your open source project-s workflow on GitHub.md
index 1f9b80cd13..29e4ea2f48 100644
--- a/sources/talk/20180419 3 tips for organizing your open source project-s workflow on GitHub.md
+++ b/sources/talk/20180419 3 tips for organizing your open source project-s workflow on GitHub.md
@@ -1,4 +1,3 @@
-translating by aiwhj
3 tips for organizing your open source project's workflow on GitHub
======
diff --git a/sources/talk/20180724 Why moving all your workloads to the cloud is a bad idea.md b/sources/talk/20180724 Why moving all your workloads to the cloud is a bad idea.md
index c4a6162068..1d97805178 100644
--- a/sources/talk/20180724 Why moving all your workloads to the cloud is a bad idea.md
+++ b/sources/talk/20180724 Why moving all your workloads to the cloud is a bad idea.md
@@ -1,5 +1,3 @@
-Translating by jessie-pang
-
Why moving all your workloads to the cloud is a bad idea
======
diff --git a/sources/tech/20140805 How to Install Cinnamon Desktop on Ubuntu.md b/sources/tech/20140805 How to Install Cinnamon Desktop on Ubuntu.md
index 78ba32e2a2..6c6e54934b 100644
--- a/sources/tech/20140805 How to Install Cinnamon Desktop on Ubuntu.md
+++ b/sources/tech/20140805 How to Install Cinnamon Desktop on Ubuntu.md
@@ -1,4 +1,4 @@
-How to Install Cinnamon Desktop on Ubuntu
+dianbanjiu Tranting How to Install Cinnamon Desktop on Ubuntu
======
**This tutorial shows you how to install Cinnamon desktop environment on Ubuntu.**
diff --git a/sources/tech/20171111 A CEOs Guide to Emacs.md b/sources/tech/20171111 A CEOs Guide to Emacs.md
index ad75b856f0..a694d07917 100644
--- a/sources/tech/20171111 A CEOs Guide to Emacs.md
+++ b/sources/tech/20171111 A CEOs Guide to Emacs.md
@@ -1,4 +1,4 @@
-# mandeler translating A CEO's Guide to Emacs
+A CEO's Guide to Emacs
============================================================
Years—no, decades—ago, I lived in Emacs. I wrote code and documents, managed email and calendar, and shelled all in the editor/OS. I was quite happy. Years went by and I moved to newer, shinier things. As a result, I forgot how to do tasks as basic as efficiently navigating files without a mouse. About three months ago, noticing just how much of my time was spent switching between applications and computers, I decided to give Emacs another try. It was a good decision for several reasons that will be covered in this post. Covered too are `.emacs` and Dropbox tips so that you can set up a good, movable environment.
diff --git a/sources/tech/20180215 Build a bikesharing app with Redis and Python.md b/sources/tech/20180215 Build a bikesharing app with Redis and Python.md
index 67ddd07730..06e4c6949a 100644
--- a/sources/tech/20180215 Build a bikesharing app with Redis and Python.md
+++ b/sources/tech/20180215 Build a bikesharing app with Redis and Python.md
@@ -1,5 +1,3 @@
-hankchow translating
-
Build a bikesharing app with Redis and Python
======
diff --git a/sources/tech/20180516 Manipulating Directories in Linux.md b/sources/tech/20180516 Manipulating Directories in Linux.md
deleted file mode 100644
index 4cc8ca4ea1..0000000000
--- a/sources/tech/20180516 Manipulating Directories in Linux.md
+++ /dev/null
@@ -1,183 +0,0 @@
-Translating by way-ww
-Manipulating Directories in Linux
-======
-
-
-
-If you are new to this series (and to Linux), [take a look at our first installment][1]. In that article, we worked our way through the tree-like structure of the Linux filesystem, or more precisely, the File Hierarchy Standard. I recommend reading through it to make sure you understand what you can and cannot safely touch. Because this time around, I’ll show how to get all touchy-feely with your directories.
-
-### Making Directories
-
-Let's get creative before getting destructive, though. To begin, open a terminal window and use `mkdir` to create a new directory like this:
-```
-mkdir
-
-```
-
-If you just put the directory name, the directory will appear hanging off the directory you are currently in. If you just opened a terminal, that will be your home directory. In a case like this, we say the directory will be created _relative_ to your current position:
-```
-$ pwd #This tells you where you are now -- see our first tutorial
-/home/
-$ mkdir newdirectory #Creates /home//newdirectory
-
-```
-
-(Note that you do not have to type the text following the `#`. Text following the pound symbol `#` is considered a comment and is used to explain what is going on. It is ignored by the shell).
-
-You can create a directory within an existing directory hanging off your current location by specifying it in the command line:
-```
-mkdir Documents/Letters
-
-```
-
-Will create the _Letters_ directory within the _Documents_ directory.
-
-You can also create a directory above where you are by using `..` in the path. Say you move into the _Documents/Letters/_ directory you just created and you want to create a _Documents/Memos/_ directory. You can do:
-```
-cd Documents/Letters # Move into your recently created Letters/ directory
-mkdir ../Memos
-
-```
-
-Again, all of the above is done relative to you current position. This is called using a _relative path_.
-
-You can also use an _absolute path_ to directories: This means telling `mkdir` where to put your directory in relation to the root (`/`) directory:
-```
-mkdir /home//Documents/Letters
-
-```
-
-Change `` to your user name in the command above and it will be equivalent to executing `mkdir Documents/Letters` from your home directory, except that it will work from wherever you are located in the directory tree.
-
-As a side note, regardless of whether you use a relative or an absolute path, if the command is successful, `mkdir` will create the directory silently, without any apparent feedback whatsoever. Only if there is some sort of trouble will `mkdir` print some feedback after you hit _[Enter]_.
-
-As with most other command-line tools, `mkdir` comes with several interesting options. The `-p` option is particularly useful, as it lets you create directories within directories within directories, even if none exist. To create, for example, a directory for letters to your Mom within _Documents/_ , you could do:
-```
-mkdir -p Documents/Letters/Family/Mom
-
-```
-
-And `mkdir` will create the whole branch of directories above _Mom/_ and also the directory _Mom/_ for you, regardless of whether any of the parent directories existed before you issued the command.
-
-You can also create several folders all at once by putting them one after another, separated by spaces:
-```
-mkdir Letters Memos Reports
-
-```
-
-will create the directories _Letters/_ , _Memos/_ and _Reports_ under the current directory.
-
-### In space nobody can hear you scream
-
-... Which brings us to the tricky question of spaces in directory names. Can you use spaces in directory names? Yes, you can. Is it advised you use spaces? No, absolutely not. Spaces make everything more complicated and, potentially, dangerous.
-
-Say you want to create a directory called _letters mom/_. If you didn't know any better, you could type:
-```
-mkdir letters mom
-
-```
-
-But this is WRONG! WRONG! WRONG! As we saw above, this will create two directories, _letters/_ and _mom/_ , but not _letters mom/_.
-
-Agreed that this is a minor annoyance: all you have to do is delete the two directories and start over. No big deal.
-
-But, wait! Deleting directories is where things get dangerous. Imagine you did create _letters mom/_ using a graphical tool, like, say [Dolphin][2] or [Nautilus][3]. If you suddenly decide to delete _letters mom/_ from a terminal, and you have another directory just called _letters/_ under the same directory, and said directory is full of important documents, and you tried this:
-```
-rmdir letters mom
-
-```
-
-You would risk removing _letters/_. I say "risk" because fortunately `rmdir`, the instruction used to remove directories, has a built in safeguard and will warn you if you try to delete a non-empty directory.
-
-However, this:
-```
-rm -Rf letters mom
-
-```
-
-(and this is a pretty standard way of getting rid of directories and their contents) will completely obliterate _letters/_ and will never even tell you what just happened.
-
-The `rm` command is used to delete files and directories. When you use it with the options `-R` (delete _recursively_ ) and `-f` ( _force_ deletion), it will burrow down into a directory and its subdirectories, deleting all the files they contain, then deleting the subdirectories themselves, then it will delete all the files in the top directory and then the directory itself.
-
-`rm -Rf` is an instruction you must handle with extreme care.
-
-My advice is, instead of spaces, use underscores (`_`), but if you still insist on spaces, there are two ways of getting them to work. You can use single or double quotes (`'` or `"`) like so:
-```
-mkdir 'letters mom'
-mkdir "letters dad"
-
-```
-
-Or, you can _escape_ the spaces. Some characters have a special meaning for the shell. Spaces, as you have seen, are used to separate options and arguments on the command line. "Separating options and arguments" falls under the category of "special meaning". When you want the shell to ignore the special meaning of a character, you need to _escape_ it and to escape a character, you put a backslash (`\`) in front of it:
-```
-mkdir letters\ mom
-mkdir letter\ dad
-
-```
-
-There are other special characters that would need escaping, like the apostrophe or single quote (`'`), double quotes (`"`), and the ampersand (`&`):
-```
-mkdir mom\ \&\ dad\'s\ letters
-
-```
-
-I know what you're thinking: If the backslash has a special meaning (to wit, telling the shell it has to escape the next character), that makes it a special character, too. Then, how would you escape the escape character which is `\`?
-
-Turns out, the exact way you escape any other special character:
-```
-mkdir special\\characters
-
-```
-
-will produce a directory called _special\characters_.
-
-Confusing? Of course. That's why you should avoid using special characters, including spaces, in directory names.
-
-For the record, here is a list of special characters you can refer to just in case.
-
-### Things to Remember
-
- * Use `mkdir ` to create a new directory.
- * Use `rmdir ` to delete a directory (only works if it is empty).
- * Use `rm -Rf ` to annihilate a directory -- use with extreme caution.
- * Use a relative path to create directories relative to your current directory: `mkdir newdir.`.
- * Use an absolute path to create directories relative to the root directory (`/`): `mkdir /home//newdir`
- * Use `..` to create a directory in the directory above the current directory: `mkdir ../newdir`
- * You can create several directories all in one go by separating them with spaces on the command line: `mkdir onedir twodir threedir`
- * You can mix and mash relative and absolute paths when creating several directories simultaneously: `mkdir onedir twodir /home//threedir`
- * Using spaces and special characters in directory names guarantees plenty of headaches and heartburn. Don't do it.
-
-
-
-For more information, you can look up the manuals of `mkdir`, `rmdir` and `rm`:
-```
-man mkdir
-man rmdir
-man rm
-
-```
-
-To exit the man pages, press _[q]_.
-
-### Next Time
-
-In the next installment, you'll learn about creating, modifying, and erasing files, as well as everything you need to know about permissions and privileges. See you then!
-
-Learn more about Linux through the free ["Introduction to Linux" ][4]course from The Linux Foundation and edX.
-
---------------------------------------------------------------------------------
-
-via: https://www.linux.com/blog/learn/2018/5/manipulating-directories-linux
-
-作者:[Paul Brown][a]
-选题:[lujun9972](https://github.com/lujun9972)
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:https://www.linux.com/users/bro66
-[1]:https://www.linux.com/blog/learn/intro-to-linux/2018/4/linux-filesystem-explained
-[2]:https://userbase.kde.org/Dolphin
-[3]:https://projects-old.gnome.org/nautilus/screenshots.html
-[4]:https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-linux
diff --git a/sources/tech/20180518 How to Manage Fonts in Linux.md b/sources/tech/20180518 How to Manage Fonts in Linux.md
index 12b450c778..0faca7fa17 100644
--- a/sources/tech/20180518 How to Manage Fonts in Linux.md
+++ b/sources/tech/20180518 How to Manage Fonts in Linux.md
@@ -1,5 +1,3 @@
-translating by Auk7F7
-
How to Manage Fonts in Linux
======
diff --git a/sources/tech/20180528 What is behavior-driven Python.md b/sources/tech/20180528 What is behavior-driven Python.md
deleted file mode 100644
index 100e0b0313..0000000000
--- a/sources/tech/20180528 What is behavior-driven Python.md
+++ /dev/null
@@ -1,308 +0,0 @@
-translating by Flowsnow
-What is behavior-driven Python?
-======
-
-Have you heard about [behavior-driven development][1] (BDD) and wondered what all the buzz is about? Maybe you've caught team members talking in "gherkin" and felt left out of the conversation. Or perhaps you're a Pythonista looking for a better way to test your code. Whatever the circumstance, learning about BDD can help you and your team achieve better collaboration and test automation, and Python's `behave` framework is a great place to start.
-
-### What is BDD?
-
- * Submitting forms on a website
- * Searching for desired results
- * Saving a document
- * Making REST API calls
- * Running command-line interface commands
-
-
-
-In software, a behavior is how a feature operates within a well-defined scenario of inputs, actions, and outcomes. Products can exhibit countless behaviors, such as:
-
-Defining a product's features based on its behaviors makes it easier to describe them, develop them, and test them. This is the heart of BDD: making behaviors the focal point of software development. Behaviors are defined early in development using a [specification by example][2] language. One of the most common behavior spec languages is [Gherkin][3], the Given-When-Then scenario format from the [Cucumber][4] project. Behavior specs are basically plain-language descriptions of how a behavior works, with a little bit of formal structure for consistency and focus. Test frameworks can easily automate these behavior specs by "gluing" step texts to code implementations.
-
-Below is an example of a behavior spec written in Gherkin:
-```
-Scenario: Basic DuckDuckGo Search
-
- Given the DuckDuckGo home page is displayed
-
- When the user searches for "panda"
-
- Then results are shown for "panda"
-
-```
-
-At a quick glance, the behavior is intuitive to understand. Except for a few keywords, the language is freeform. The scenario is concise yet meaningful. A real-world example illustrates the behavior. Steps declaratively indicate what should happen—without getting bogged down in the details of how.
-
-The [main benefits of BDD][5] are good collaboration and automation. Everyone can contribute to behavior development, not just programmers. Expected behaviors are defined and understood from the beginning of the process. Tests can be automated together with the features they cover. Each test covers a singular, unique behavior in order to avoid duplication. And, finally, existing steps can be reused by new behavior specs, creating a snowball effect.
-
-### Python's behave framework
-
-`behave` is one of the most popular BDD frameworks in Python. It is very similar to other Gherkin-based Cucumber frameworks despite not holding the official Cucumber designation. `behave` has two primary layers:
-
- 1. Behavior specs written in Gherkin `.feature` files
- 2. Step definitions and hooks written in Python modules that implement Gherkin steps
-
-
-
-As shown in the example above, Gherkin scenarios use a three-part format:
-
- 1. Given some initial state
- 2. When an action is taken
- 3. Then verify the outcome
-
-
-
-Each step is "glued" by decorator to a Python function when `behave` runs tests.
-
-### Installation
-
-As a prerequisite, make sure you have Python and `pip` installed on your machine. I strongly recommend using Python 3. (I also recommend using [`pipenv`][6], but the following example commands use the more basic `pip`.)
-
-Only one package is required for `behave`:
-```
-pip install behave
-
-```
-
-Other packages may also be useful, such as:
-```
-pip install requests # for REST API calls
-
-pip install selenium # for Web browser interactions
-
-```
-
-The [behavior-driven-Python][7] project on GitHub contains the examples used in this article.
-
-### Gherkin features
-
-The Gherkin syntax that `behave` uses is practically compliant with the official Cucumber Gherkin standard. A `.feature` file has Feature sections, which in turn have Scenario sections with Given-When-Then steps. Below is an example:
-```
-Feature: Cucumber Basket
-
- As a gardener,
-
- I want to carry many cucumbers in a basket,
-
- So that I don’t drop them all.
-
-
-
- @cucumber-basket
-
- Scenario: Add and remove cucumbers
-
- Given the basket is empty
-
- When "4" cucumbers are added to the basket
-
- And "6" more cucumbers are added to the basket
-
- But "3" cucumbers are removed from the basket
-
- Then the basket contains "7" cucumbers
-
-```
-
-There are a few important things to note here:
-
- * Both the Feature and Scenario sections have [short, descriptive titles][8].
- * The lines immediately following the Feature title are comments ignored by `behave`. It is a good practice to put the user story there.
- * Scenarios and Features can have tags (notice the `@cucumber-basket` mark) for hooks and filtering (explained below).
- * Steps follow a [strict Given-When-Then order][9].
- * Additional steps can be added for any type using `And` and `But`.
- * Steps can be parametrized with inputs—notice the values in double quotes.
-
-
-
-Scenarios can also be written as templates with multiple input combinations by using a Scenario Outline:
-```
-Feature: Cucumber Basket
-
-
-
- @cucumber-basket
-
- Scenario Outline: Add cucumbers
-
- Given the basket has “” cucumbers
-
- When "" cucumbers are added to the basket
-
- Then the basket contains "" cucumbers
-
-
-
- Examples: Cucumber Counts
-
- | initial | more | total |
-
- | 0 | 1 | 1 |
-
- | 1 | 2 | 3 |
-
- | 5 | 4 | 9 |
-
-```
-
-Scenario Outlines always have an Examples table, in which the first row gives column titles and each subsequent row gives an input combo. The row values are substituted wherever a column title appears in a step surrounded by angle brackets. In the example above, the scenario will be run three times because there are three rows of input combos. Scenario Outlines are a great way to avoid duplicate scenarios.
-
-There are other elements of the Gherkin language, but these are the main mechanics. To learn more, read the Automation Panda articles [Gherkin by Example][10] and [Writing Good Gherkin][11].
-
-### Python mechanics
-
-Every Gherkin step must be "glued" to a step definition, a Python function that provides the implementation. Each function has a step type decorator with the matching string. It also receives a shared context and any step parameters. Feature files must be placed in a directory named `features/`, while step definition modules must be placed in a directory named `features/steps/`. Any feature file can use step definitions from any module—they do not need to have the same names. Below is an example Python module with step definitions for the cucumber basket features.
-```
-from behave import *
-
-from cucumbers.basket import CucumberBasket
-
-
-
-@given('the basket has "{initial:d}" cucumbers')
-
-def step_impl(context, initial):
-
- context.basket = CucumberBasket(initial_count=initial)
-
-
-
-@when('"{some:d}" cucumbers are added to the basket')
-
-def step_impl(context, some):
-
- context.basket.add(some)
-
-
-
-@then('the basket contains "{total:d}" cucumbers')
-
-def step_impl(context, total):
-
- assert context.basket.count == total
-
-```
-
-Three [step matchers][12] are available: `parse`, `cfparse`, and `re`. The default and simplest marcher is `parse`, which is shown in the example above. Notice how parametrized values are parsed and passed into the functions as input arguments. A common best practice is to put double quotes around parameters in steps.
-
-Each step definition function also receives a [context][13] variable that holds data specific to the current scenario being run, such as `feature`, `scenario`, and `tags` fields. Custom fields may be added, too, to share data between steps. Always use context to share data—never use global variables!
-
-`behave` also supports [hooks][14] to handle automation concerns outside of Gherkin steps. A hook is a function that will be run before or after a step, scenario, feature, or whole test suite. Hooks are reminiscent of [aspect-oriented programming][15]. They should be placed in a special `environment.py` file under the `features/` directory. Hook functions can check the current scenario's tags, as well, so logic can be selectively applied. The example below shows how to use hooks to set up and tear down a Selenium WebDriver instance for any scenario tagged as `@web`.
-```
-from selenium import webdriver
-
-
-
-def before_scenario(context, scenario):
-
- if 'web' in context.tags:
-
- context.browser = webdriver.Firefox()
-
- context.browser.implicitly_wait(10)
-
-
-
-def after_scenario(context, scenario):
-
- if 'web' in context.tags:
-
- context.browser.quit()
-
-```
-
-Note: Setup and cleanup can also be done with [fixtures][16] in `behave`.
-
-To offer an idea of what a `behave` project should look like, here's the example project's directory structure:
-
-
-
-Any Python packages and custom modules can be used with `behave`. Use good design patterns to build a scalable test automation solution. Step definition code should be concise.
-
-### Running tests
-
-To run tests from the command line, change to the project's root directory and run the `behave` command. Use the `–help` option to see all available options.
-
-Below are a few common use cases:
-```
-# run all tests
-
-behave
-
-
-
-# run the scenarios in a feature file
-
-behave features/web.feature
-
-
-
-# run all tests that have the @duckduckgo tag
-
-behave --tags @duckduckgo
-
-
-
-# run all tests that do not have the @unit tag
-
-behave --tags ~@unit
-
-
-
-# run all tests that have @basket and either @add or @remove
-
-behave --tags @basket --tags @add,@remove
-
-```
-
-For convenience, options may be saved in [config][17] files.
-
-### Other options
-
-`behave` is not the only BDD test framework in Python. Other good frameworks include:
-
- * `pytest-bdd` , a plugin for `pytest``behave`, it uses Gherkin feature files and step definition modules, but it also leverages all the features and plugins of `pytest`. For example, it can run Gherkin scenarios in parallel using `pytest-xdist`. BDD and non-BDD tests can also be executed together with the same filters. `pytest-bdd` also offers a more flexible directory layout.
-
- * `radish` is a "Gherkin-plus" framework—it adds Scenario Loops and Preconditions to the standard Gherkin language, which makes it more friendly to programmers. It also offers rich command line options like `behave`.
-
- * `lettuce` is an older BDD framework very similar to `behave`, with minor differences in framework mechanics. However, GitHub shows little recent activity in the project (as of May 2018).
-
-
-
-Any of these frameworks would be good choices.
-
-Also, remember that Python test frameworks can be used for any black box testing, even for non-Python products! BDD frameworks are great for web and service testing because their tests are declarative, and Python is a [great language for test automation][18].
-
-This article is based on the author's [PyCon Cleveland 2018][19] talk, [Behavior-Driven Python][20].
-
---------------------------------------------------------------------------------
-
-via: https://opensource.com/article/18/5/behavior-driven-python
-
-作者:[Andrew Knight][a]
-选题:[lujun9972](https://github.com/lujun9972)
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[a]:https://opensource.com/users/andylpk247
-[1]:https://automationpanda.com/bdd/
-[2]:https://en.wikipedia.org/wiki/Specification_by_example
-[3]:https://automationpanda.com/2017/01/26/bdd-101-the-gherkin-language/
-[4]:https://cucumber.io/
-[5]:https://automationpanda.com/2017/02/13/12-awesome-benefits-of-bdd/
-[6]:https://docs.pipenv.org/
-[7]:https://github.com/AndyLPK247/behavior-driven-python
-[8]:https://automationpanda.com/2018/01/31/good-gherkin-scenario-titles/
-[9]:https://automationpanda.com/2018/02/03/are-gherkin-scenarios-with-multiple-when-then-pairs-okay/
-[10]:https://automationpanda.com/2017/01/27/bdd-101-gherkin-by-example/
-[11]:https://automationpanda.com/2017/01/30/bdd-101-writing-good-gherkin/
-[12]:http://behave.readthedocs.io/en/latest/api.html#step-parameters
-[13]:http://behave.readthedocs.io/en/latest/api.html#detecting-that-user-code-overwrites-behave-context-attributes
-[14]:http://behave.readthedocs.io/en/latest/api.html#environment-file-functions
-[15]:https://en.wikipedia.org/wiki/Aspect-oriented_programming
-[16]:http://behave.readthedocs.io/en/latest/api.html#fixtures
-[17]:http://behave.readthedocs.io/en/latest/behave.html#configuration-files
-[18]:https://automationpanda.com/2017/01/21/the-best-programming-language-for-test-automation/
-[19]:https://us.pycon.org/2018/
-[20]:https://us.pycon.org/2018/schedule/presentation/87/
diff --git a/sources/tech/20180531 How to Build an Amazon Echo with Raspberry Pi.md b/sources/tech/20180531 How to Build an Amazon Echo with Raspberry Pi.md
index 0bf792f769..a5d4767706 100644
--- a/sources/tech/20180531 How to Build an Amazon Echo with Raspberry Pi.md
+++ b/sources/tech/20180531 How to Build an Amazon Echo with Raspberry Pi.md
@@ -1,5 +1,3 @@
-heart4lor translating
-
How to Build an Amazon Echo with Raspberry Pi
======
diff --git a/sources/tech/20180615 Complete Sed Command Guide [Explained with Practical Examples].md b/sources/tech/20180615 Complete Sed Command Guide [Explained with Practical Examples].md
index a1d721ae3c..e548213483 100644
--- a/sources/tech/20180615 Complete Sed Command Guide [Explained with Practical Examples].md
+++ b/sources/tech/20180615 Complete Sed Command Guide [Explained with Practical Examples].md
@@ -1,4 +1,3 @@
-translating by amwps290
Complete Sed Command Guide [Explained with Practical Examples]
======
In a previous article, I showed the [basic usage of Sed][1], the stream editor, on a practical use case. Today, be prepared to gain more insight about Sed as we will take an in-depth tour of the sed execution model. This will be also an opportunity to make an exhaustive review of all Sed commands and to dive into their details and subtleties. So, if you are ready, launch a terminal, [download the test files][2] and sit comfortably before your keyboard: we will start our exploration right now!
diff --git a/sources/tech/20180618 What-s all the C Plus Fuss- Bjarne Stroustrup warns of dangerous future plans for his C.md b/sources/tech/20180618 What-s all the C Plus Fuss- Bjarne Stroustrup warns of dangerous future plans for his C.md
deleted file mode 100644
index 2f9a6636e7..0000000000
--- a/sources/tech/20180618 What-s all the C Plus Fuss- Bjarne Stroustrup warns of dangerous future plans for his C.md
+++ /dev/null
@@ -1,155 +0,0 @@
-Translating by qhwdw
-What's all the C Plus Fuss? Bjarne Stroustrup warns of dangerous future plans for his C++
-======
-
-
-
-**Interview** Earlier this year, Bjarne Stroustrup, creator of C++, managing director in the technology division of Morgan Stanley, and a visiting professor of computer science at Columbia University in the US, wrote [a letter][1] inviting those overseeing the evolution of the programming language to “Remember the Vasa!”
-
-Easy for a Dane to understand no doubt, but perhaps more of a stretch for those with a few gaps in their knowledge of 17th century Scandinavian history. The Vasa was a Swedish warship, commissioned by King Gustavus Adolphus. It was the most powerful warship in the Baltic Sea from its maiden voyage on the August 10, 1628, until a few minutes later when it sank.
-
-The formidable Vasa suffered from a design flaw: it was top-heavy, so much so that it was [undone by a gust of wind][2]. By invoking the memory of the capsized ship, Stroustrup served up a cautionary tale about the risks facing C++ as more and more features get added to the language.
-
-Quite a few such features have been suggested. Stroustrup cited 43 proposals in his letter. He contends those participating in the evolution of the ISO standard language, a group known as [WG21][3], are working to advance the language but not together.
-
-In his letter, he wrote:
-
->Individually, many proposals make sense. Together they are insanity to the point of endangering the future of C++.
-
-He makes clear that he doesn’t interpret the fate of the Vasa to mean that incremental improvements spell doom. Rather, he takes it as a lesson to build a solid foundation, to learn from experience and to test thoroughly.
-
-With the recent conclusion of the C++ Standardization Committee Meeting in Rapperswil, Switzerland, earlier this month, Stroustrup addressed a few questions put to him by _The Register_ about what's next for the language. (The most recent version is C++17, which arrived last year; the next version C++20 is under development and expected in 2020.)
-
-**_Register:_ In your note, Remember the Vasa!, you wrote:**
-
->The foundation begun in C++11 is not yet complete, and C++17 did little to make our foundation more solid, regular, and complete. Instead, it added significant surface complexity and increased the number of features people need to learn. C++ could crumble under the weight of these – mostly not quite fully-baked – proposals. We should not spend most our time creating increasingly complicated facilities for experts, such as ourselves.
-
-**Is C++ too challenging for newcomers, and if so, what features do you believe would make the language more accessible?**
-
-_**Stroustrup:**_ Some parts of C++ are too challenging for newcomers.
-
-On the other hand, there are parts of C++ that makes it far more accessible to newcomers than C or 1990s C++. The difficulty is to get the larger community to focus on those parts and help beginners and casual C++ users to avoid the parts that are there to support implementers of advanced libraries.
-
-I recommend the [C++ Core Guidelines][4] as an aide for that.
-
-Also, my “A Tour of C++” can help people get on the right track with modern C++ without getting lost in 1990s complexities or ensnarled by modern facilities meant for expert use. The second edition of “A Tour of C++” covering C++17 and parts of C++20 is on its way to the stores.
-
-I and others have taught C++ to 1st year university students with no previous programming experience in 3 months. It can be done as long as you don’t try to dig into every obscure corner of the language and focus on modern C++.
-
-“Making simple things simple” is a long-term goal of mine. Consider the C++11 range-for loop:
-```
-for (int& x : v) ++x; // increment each element of the container v
-
-```
-
-where v can be just about any container. In C and C-style C++, that might look like this:
-```
-for (int i=0; i
+
+```
+如果你只输入了目录名称,该目录将显示在您当前所在目录中。如果你刚刚打开一个终端,你当前位置为你的家目录。下面这个例子,我们展示了将要创建的目录与你当前所处位置的关系:
+```
+$ pwd #This tells you where you are now -- see our first tutorial
+/home/
+$ mkdir newdirectory #Creates /home//newdirectory
+
+```
+(注 你不用输入#后面的文本。#后面的文本为注释内容,用于解释发生了什么。它会被shell忽略,不会被执行).
+
+你可以在当前位置中已经存在的某个目录下创建新的目录,方法是在命令行中指定它:
+```
+mkdir Documents/Letters
+
+```
+这将在Documents目录中创建Letters目录。
+
+你还可以在路径中使用..在当前目录的上一级目录中创建目录。假设你进入刚刚创建的Documents/Letters/目录,并且想要创建Documents/Memos/目录。你可以这样做:
+```
+cd Documents/Letters # Move into your recently created Letters/ directory
+mkdir ../Memos
+
+```
+同样,以上所有内容都是相对于你当前的位置做的。这就是使用了相对路径。
+你还可以使用目录的绝对路径:这意味着告诉mkdir命令将目录放在和根目录(/)有关的位置:
+```
+mkdir /home//Documents/Letters
+
+```
+在上面的命令中将更改为你的用户名,这相当于从你的主目录执行mkdir Documents / Letters,通过使用绝对路径你可以在目录树中的任何位置完成这项工作。
+
+无论你使用相对路径还是绝对路径,只要命令成功执行,mkdir将静默的创建新目录,而没有任何明显的反馈。只有当遇到某种问题时,mkdir才会在你敲下[Enter]后打印一些反馈。
+
+与大多数其他命令行工具一样,mkdir提供了几个有趣的选项。 -p选项特别有用,因为它允许你创建嵌套目录,即使目录不存在也可以。例如,要在Documents /中创建一个目录存放写给妈妈的信,你可以这样做:
+```
+mkdir -p Documents/Letters/Family/Mom
+
+```
+And `mkdir` will create the whole branch of directories above _Mom/_ and also the directory _Mom/_ for you, regardless of whether any of the parent directories existed before you issued the command.
+
+你也可以用空格来分隔目录名,来同时创建几个目录:
+```
+mkdir Letters Memos Reports
+
+```
+这将在当前目录下创建目录Letters,Memos和Reports。
+
+### 目录名中可怕的空格
+
+... 这带来了目录名称中关于空格的棘手问题。你能在目录名中使用空格吗?是的你可以。那么建议你使用空格吗?不,绝对不是。空格使一切变得更加复杂,并且可能是危险的操作。
+
+假设您要创建一个名为letters mom的目录。如果你不知道如何更好处理,你可能会输入:
+```
+mkdir letters mom
+
+```
+但这是错误的!错误的!错误的!正如我们在上面介绍的,这将创建两个目录letters和mom,而不是一个目录letters mom。
+
+得承认这是一个小麻烦:你所要做的就是删除这两个目录并重新开始,这没什么大不了。
+
+可是等等!删除目录可是个危险的操作。想象一下,你确实使用图形工具[Dolphin][2]或[Nautilus][3]创建了目录letters mom。如果你突然决定从终端删除目录letters mom,并且您在同一目录下有另一个名为letters的目录,并且该目录中包含重要的文档,结果你为了删除错误的目录尝试了以下操作:
+```
+rmdir letters mom
+
+```
+你将会有风险删除目录letters。这里说“风险”,是因为幸运的是rmdir这条用于删除目录的指令,有一个内置的安全措施,如果你试图删除一个非空目录时,它会发出警告。
+
+但是,下面这个:
+```
+rm -Rf letters mom
+
+```
+(注 这是删除目录及其内容的一种非常标准的方式)将完全删除letters目录,甚至永远不会告诉你刚刚发生了什么。
+
+rm命令用于删除文件和目录。当你将它与选项-R(递归删除)和-f(强制删除)一起使用时,它会深入到目录及其子目录中,删除它们包含的所有文件,然后删除子目录本身,然后它将删除所有顶层目录中的文件,再然后是删除目录本身。
+
+`rm -Rf` 是你必须非常小心处理的命令。
+
+我的建议是,你可以使用下划线来代替空格,但如果你仍然坚持使用空格,有两种方法可以使它们起作用。您可以使用单引号或双引号,如下所示:
+```
+mkdir 'letters mom'
+mkdir "letters dad"
+
+```
+或者,你可以转义空格。有些字符对shell有特殊意义。正如你所见,空格用于在命令行上分隔选项和参数。 “分离选项和参数”属于“特殊含义”范畴。当你想让shell忽略一个字符的特殊含义时,你需要转义,你可以在它前面放一个反斜杠(\)如:
+```
+mkdir letters\ mom
+mkdir letter\ dad
+
+```
+还有其他特殊字符需要转义,如撇号或单引号('),双引号(“)和&符号(&):
+```
+mkdir mom\ \&\ dad\'s\ letters
+
+```
+我知道你在想什么:如果反斜杠有一个特殊的含义(即告诉shell它必须转义下一个字符),这也使它成为一个特殊的字符。然后,你将如何转义转义字符(\)?
+
+事实证明,你转义任何其他特殊字符都是同样的方式:
+```
+mkdir special\\characters
+
+```
+这将生成一个名为special\characters的目录。
+
+感觉困惑?当然。这就是为什么你应该避免在目录名中使用特殊字符,包括空格。
+
+以防误操作你可以参考下面这个记录特殊字符的列表。
+
+### 总结
+
+ * 使用 `mkdir ` 创建新目录。
+ * 使用 `rmdir ` 删除目录(仅在目录为空时才有效)。
+ * 使用 `rm -Rf ` 来完全删除目录及其内容 - 请务必谨慎使用。
+ * 使用相对路径创建相对于当前目录的目录: `mkdir newdir.`.
+ * 使用绝对路径创建相对于根目录(`/`)的目录: `mkdir /home//newdir`
+ * 使用 `..` 在当前目录的上级目录中创建目录: `mkdir ../newdir`
+ * 你可以通过在命令行上使用空格分隔目录名来创建多个目录: `mkdir onedir twodir threedir`
+ * 同时创建多个目录时,你可以混合使用相对路径和绝对路径: `mkdir onedir twodir /home//threedir`
+ * 在目录名称中使用空格和特殊字符真的会让你很头疼,你最好不要那样做。
+
+
+
+有关更多信息,您可以查看`mkdir`, `rmdir` 和 `rm`的手册:
+```
+man mkdir
+man rmdir
+man rm
+
+```
+要退出手册页,请按键盘[q]键。
+
+### 下次预告
+
+在下一部分中,你将学习如何创建,修改和删除文件,以及你需要了解的有关权限和特权的所有信息!
+
+通过Linux Foundation和edX免费提供的["Introduction to Linux" ][4]课程了解有关Linux的更多信息。
+
+--------------------------------------------------------------------------------
+
+via: https://www.linux.com/blog/learn/2018/5/manipulating-directories-linux
+
+作者:[Paul Brown][a]
+选题:[lujun9972](https://github.com/lujun9972)
+译者:[way-ww](https://github.com/way-ww)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:https://www.linux.com/users/bro66
+[1]:https://www.linux.com/blog/learn/intro-to-linux/2018/4/linux-filesystem-explained
+[2]:https://userbase.kde.org/Dolphin
+[3]:https://projects-old.gnome.org/nautilus/screenshots.html
+[4]:https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-linux
diff --git a/translated/tech/20180528 What is behavior-driven Python.md b/translated/tech/20180528 What is behavior-driven Python.md
new file mode 100644
index 0000000000..16edc3c802
--- /dev/null
+++ b/translated/tech/20180528 What is behavior-driven Python.md
@@ -0,0 +1,237 @@
+什么是行为驱动的Python?
+======
+
+
+您是否听说过[行为驱动开发][1](BDD),并想知道所有的新奇事物是什么? 也许你已经发现了团队成员在使用“gherkin”了,并感到被排除在外无法参与其中。 或许你是一个Python爱好者,正在寻找更好的方法来测试你的代码。 无论在什么情况下,了解BDD都可以帮助您和您的团队实现更好的协作和测试自动化,而Python的`行为`框架是一个很好的起点。
+
+### 什么是BDD?
+
+ * 在网站上提交表单
+ * 搜索想要的结果
+ * 保存文档
+ * 进行REST API调用
+ * 运行命令行界面命令
+
+在软件中,行为是指在明确定义的输入,行为和结果场景中功能是如何运转的。 产品可以表现出无数的行为,例如:
+
+根据产品的行为定义产品的功能可以更容易地描述产品,并对其进行开发和测试。 BDD的核心是:使行为成为软件开发的焦点。 在开发早期使用示例语言的规范来定义行为。 最常见的行为规范语言之一是Gherkin,Cucumber项目中的Given-When-Then场景格式。 行为规范基本上是对行为如何工作的简单语言描述,具有一致性和焦点的一些正式结构。 通过将步骤文本“粘合”到代码实现,测试框架可以轻松地自动化这些行为规范。
+
+下面是用Gherkin编写的行为规范的示例:
+
+根据产品的行为定义产品的功能可以更容易地描述产品,开发产品并对其进行测试。 这是BDD的核心:使行为成为软件开发的焦点。 在开发早期使用[示例规范][2]的语言来定义行为。 最常见的行为规范语言之一是[Gherkin][3],[Cucumber][4]项目中的Given-When-Then场景格式。 行为规范基本上是对行为如何工作的简单语言描述,具有一致性和焦点的一些正式结构。 通过将步骤文本“粘合”到代码实现,测试框架可以轻松地自动化这些行为规范。
+
+下面是用Gherkin编写的行为规范的示例:
+
+```
+Scenario: Basic DuckDuckGo Search
+ Given the DuckDuckGo home page is displayed
+ When the user searches for "panda"
+ Then results are shown for "panda"
+```
+
+快速浏览一下,行为是直观易懂的。 除少数关键字外,该语言为自由格式。 场景简洁而有意义。 一个真实的例子说明了这种行为。 步骤以声明的方式表明应该发生什么——而不会陷入如何如何的细节中。
+
+[BDD的主要优点][5]是良好的协作和自动化。 每个人都可以为行为开发做出贡献,而不仅仅是程序员。 从流程开始就定义并理解预期的行为。 测试可以与它们涵盖的功能一起自动化。 每个测试都包含一个单一的,独特的行为,以避免重复。 最后,现有的步骤可以通过新的行为规范重用,从而产生雪球效果。
+
+### Python的behave框架
+
+`behave`是Python中最流行的BDD框架之一。 它与其他基于Gherkin的Cucumber框架非常相似,尽管没有得到官方的Cucumber定名。 `behave`有两个主要层:
+
+1. 用Gherkin的`.feature`文件编写的行为规范
+2. 用Python模块编写的步骤定义和钩子,用于实现Gherkin步骤
+
+如上例所示,Gherkin场景有三部分格式:
+
+1. 鉴于一些初始状态
+2. 当行为发生时
+3. 然后验证结果
+
+当`behave`运行测试时,每个步骤由装饰器“粘合”到Python函数。
+
+### 安装
+
+作为先决条件,请确保在你的计算机上安装了Python和`pip`。 我强烈建议使用Python 3.(我还建议使用[`pipenv`][6],但以下示例命令使用更基本的`pip`。)
+
+`behave`框架只需要一个包:
+
+```
+pip install behave
+```
+
+其他包也可能有用,例如:
+```
+pip install requests # 用于调用REST API
+pip install selenium # 用于web浏览器交互
+```
+
+GitHub上的[behavior-driven-Python][7]项目包含本文中使用的示例。
+
+### Gherkin特点
+
+`behave`框架使用的Gherkin语法实际上是符合官方的Cucumber Gherkin标准的。 `.feature`文件包含功能Feature部分,而Feature部分又包含具有Given-When-Then步骤的场景Scenario部分。 以下是一个例子:
+
+```
+Feature: Cucumber Basket
+ As a gardener,
+ I want to carry many cucumbers in a basket,
+ So that I don’t drop them all.
+
+ @cucumber-basket
+ Scenario: Add and remove cucumbers
+ Given the basket is empty
+ When "4" cucumbers are added to the basket
+ And "6" more cucumbers are added to the basket
+ But "3" cucumbers are removed from the basket
+ Then the basket contains "7" cucumbers
+```
+
+这里有一些重要的事情需要注意:
+
+- Feature和Scenario部分都有[简短的描述性标题][8]。
+- 紧跟在Feature标题后面的行是会被`behave`框架忽略掉的注释。将功能描述放在那里是一种很好的做法。
+- Scenarios和Features可以有标签(注意`@cucumber-basket`标记)用于钩子和过滤(如下所述)。
+- 步骤都遵循[严格的Given-When-Then顺序][9]。
+- 使用`And`和`Bu`t可以为任何类型添加附加步骤。
+- 可以使用输入对步骤进行参数化——注意双引号里的值。
+
+通过使用场景大纲,场景也可以写为具有多个输入组合的模板:
+
+```
+Feature: Cucumber Basket
+
+ @cucumber-basket
+ Scenario Outline: Add cucumbers
+ Given the basket has “” cucumbers
+ When "" cucumbers are added to the basket
+ Then the basket contains "" cucumbers
+
+ Examples: Cucumber Counts
+ | initial | more | total |
+ | 0 | 1 | 1 |
+ | 1 | 2 | 3 |
+ | 5 | 4 | 9 |
+```
+
+场景大纲总是有一个Examples表,其中第一行给出列标题,后续每一行给出一个输入组合。 只要列标题出现在由尖括号括起的步骤中,行值就会被替换。 在上面的示例中,场景将运行三次,因为有三行输入组合。 场景大纲是避免重复场景的好方法。
+
+Gherkin语言还有其他元素,但这些是主要的机制。 想了解更多信息,请阅读Automation Panda这个网站的文章[Gherkin by Example][10]和[Writing Good Gherkin][11]。
+
+### Python机制
+
+每个Gherkin步骤必须“粘合”到步骤定义,即提供了实现的Python函数。 每个函数都有一个带有匹配字符串的步骤类型装饰器。 它还接收共享的上下文和任何步骤参数。 功能文件必须放在名为`features/`的目录中,而步骤定义模块必须放在名为`features/steps/`的目录中。 任何功能文件都可以使用任何模块中的步骤定义——它们不需要具有相同的名称。 下面是一个示例Python模块,其中包含cucumber basket功能的步骤定义。
+
+```
+from behave import *
+from cucumbers.basket import CucumberBasket
+
+@given('the basket has "{initial:d}" cucumbers')
+def step_impl(context, initial):
+ context.basket = CucumberBasket(initial_count=initial)
+
+@when('"{some:d}" cucumbers are added to the basket')
+def step_impl(context, some):
+ context.basket.add(some)
+
+@then('the basket contains "{total:d}" cucumbers')
+def step_impl(context, total):
+ assert context.basket.count == total
+```
+
+可以使用三个[步骤匹配器][12]:`parse`,`cfparse`和`re`。默认和最简单的匹配器是`parse`,如上例所示。注意如何解析参数化值并将其作为输入参数传递给函数。一个常见的最佳实践是在步骤中给参数加双引号。
+
+每个步骤定义函数还接收一个[上下文][13]变量,该变量保存当前正在运行的场景的数据,例如`feature`, `scenario`和`tags`字段。也可以添加自定义字段,用于在步骤之间共享数据。始终使用上下文来共享数据——永远不要使用全局变量!
+
+`behave`框架还支持[钩子][14]来处理Gherkin步骤之外的自动化问题。钩子是一个将在步骤,场景,功能或整个测试套件之前或之后运行的功能。钩子让人联想到[面向方面的编程][15]。它们应放在`features/`目录下的特殊`environment.py`文件中。钩子函数也可以检查当前场景的标签,因此可以有选择地应用逻辑。下面的示例显示了如何使用钩子为标记为`@web`的任何场景生成和销毁一个Selenium WebDriver实例。
+
+```
+from selenium import webdriver
+
+def before_scenario(context, scenario):
+ if 'web' in context.tags:
+ context.browser = webdriver.Firefox()
+ context.browser.implicitly_wait(10)
+
+def after_scenario(context, scenario):
+ if 'web' in context.tags:
+ context.browser.quit()
+```
+
+注意:也可以使用[fixtures][16]进行构建和清理。
+
+要了解一个`behave`项目应该是什么样子,这里是示例项目的目录结构:
+
+
+
+任何Python包和自定义模块都可以与`behave`框架一起使用。 使用良好的设计模式构建可扩展的测试自动化解决方案。步骤定义代码应简明扼要。
+
+### 运行测试
+
+要从命令行运行测试,请切换到项目的根目录并运行`behave`命令。 使用`-help`选项查看所有可用选项。
+
+以下是一些常见用例:
+
+```
+# run all tests
+behave
+
+# run the scenarios in a feature file
+behave features/web.feature
+
+# run all tests that have the @duckduckgo tag
+behave --tags @duckduckgo
+
+# run all tests that do not have the @unit tag
+behave --tags ~@unit
+
+# run all tests that have @basket and either @add or @remove
+behave --tags @basket --tags @add,@remove
+```
+
+为方便起见,选项可以保存在[config][17]文件中。
+
+### 其他选择
+
+`behave`不是Python中唯一的BDD测试框架。其他好的框架包括:
+
+- `pytest-bdd`,`pytest`的插件,和`behave`一样,它使用Gherkin功能文件和步骤定义模块,但它也利用了`pytest`的所有功能和插件。例如,它可以使用`pytest-xdist`并行运行Gherkin场景。 BDD和非BDD测试也可以与相同的过滤器一起执行。 `pytest-bdd`还提供更灵活的目录布局。
+- `radish`是一个“Gherkin增强版”框架——它将Scenario循环和前提条件添加到标准的Gherkin语言中,这使得它对程序员更友好。它还提供丰富的命令行选项,如`behave`。
+- `lettuce`是一种较旧的BDD框架,与`behave`非常相似,在框架机制方面存在细微差别。然而,GitHub最近显示该项目的活动很少(截至2018年5月)。
+
+任何这些框架都是不错的选择。
+
+另外,请记住,Python测试框架可用于任何黑盒测试,即使对于非Python产品也是如此! BDD框架非常适合Web和服务测试,因为它们的测试是声明性的,而Python是一种[很好的测试自动化语言][18]。
+
+本文基于作者的[PyCon Cleveland 2018][19]演讲,[行为驱动的Python][20]。
+
+--------------------------------------------------------------------------------
+
+via: https://opensource.com/article/18/5/behavior-driven-python
+
+作者:[Andrew Knight][a]
+选题:[lujun9972](https://github.com/lujun9972)
+译者:[Flowsnow](https://github.com/Flowsnow)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:https://opensource.com/users/andylpk247
+[1]:https://automationpanda.com/bdd/
+[2]:https://en.wikipedia.org/wiki/Specification_by_example
+[3]:https://automationpanda.com/2017/01/26/bdd-101-the-gherkin-language/
+[4]:https://cucumber.io/
+[5]:https://automationpanda.com/2017/02/13/12-awesome-benefits-of-bdd/
+[6]:https://docs.pipenv.org/
+[7]:https://github.com/AndyLPK247/behavior-driven-python
+[8]:https://automationpanda.com/2018/01/31/good-gherkin-scenario-titles/
+[9]:https://automationpanda.com/2018/02/03/are-gherkin-scenarios-with-multiple-when-then-pairs-okay/
+[10]:https://automationpanda.com/2017/01/27/bdd-101-gherkin-by-example/
+[11]:https://automationpanda.com/2017/01/30/bdd-101-writing-good-gherkin/
+[12]:http://behave.readthedocs.io/en/latest/api.html#step-parameters
+[13]:http://behave.readthedocs.io/en/latest/api.html#detecting-that-user-code-overwrites-behave-context-attributes
+[14]:http://behave.readthedocs.io/en/latest/api.html#environment-file-functions
+[15]:https://en.wikipedia.org/wiki/Aspect-oriented_programming
+[16]:http://behave.readthedocs.io/en/latest/api.html#fixtures
+[17]:http://behave.readthedocs.io/en/latest/behave.html#configuration-files
+[18]:https://automationpanda.com/2017/01/21/the-best-programming-language-for-test-automation/
+[19]:https://us.pycon.org/2018/
+[20]:https://us.pycon.org/2018/schedule/presentation/87/
diff --git a/translated/tech/20180618 What-s all the C Plus Fuss- Bjarne Stroustrup warns of dangerous future plans for his C.md b/translated/tech/20180618 What-s all the C Plus Fuss- Bjarne Stroustrup warns of dangerous future plans for his C.md
new file mode 100644
index 0000000000..42bd3d3dd9
--- /dev/null
+++ b/translated/tech/20180618 What-s all the C Plus Fuss- Bjarne Stroustrup warns of dangerous future plans for his C.md
@@ -0,0 +1,163 @@
+# 关于 C ++ 的所有争论?Bjarne Stroustrup 警告他的 C++ 未来的计划很危险
+
+
+
+今年早些时候,我们**访谈**了 Bjarne Stroustrup,他是 C++ 语言的创始人,摩根士丹利技术部门的董事总经理,美国哥伦比亚大学计算机科学的客座教授,他写了[一封信][1]邀请那些关注编程语言演进的人去“想想瓦萨号!”
+
+毫无疑问,对于丹麦人来说,这句话很容易理解,而那些对于 17 世纪的斯堪的纳维亚历史了解不多的人,还需要展开说一下。瓦萨号是一艘瑞典军舰,由国王 Gustavus Adolphus 委托建造。它是在 1628 年 8 月 10 日首航时,当时波罗的海国家中最强大的军舰,但是它在首航几分钟之后就沉没了。
+
+巨大的瓦萨号有一个难以解决的设计缺陷:头重脚轻,以至于它被[一阵狂风刮翻了][2]。通过这段翻船历史的回忆,Stroustrup 警示了 C++ 所面临的风险,因为现在越来越多的特性被添加到了 C++ 中。
+
+现在已经提议了不少这样的特性。Stroustrup 在他的信中引用了 43 条提议。他认为那些参与 C++ 语言 ISO 标准演进的人(指众所周知的 [WG21][3]),正在努力地让语言更高级,但他们的努力方向却并不一致。
+
+在他的信中,他写道:
+
+> 分开来看,许多提议都很有道理。但将它们综合到一起,这些提议是很愚蠢的,将危害 C++ 的未来。
+
+他明确表示,不希望 C++ 重蹈瓦萨号的覆辙,这种渐近式的改进将敲响 C++ 的丧钟。相反,应该吸取瓦萨号的教训,构建一个坚实的基础,吸取经验教训,并做彻底的测试。
+
+在瑞士拉普斯威尔(Rapperswill)召开的 C++ 标准化委员会会议之后,本月早些时候,Stroustrup 接受了_《The Register》_ 的采访,回答了有关 C++ 语言下一步发展方向方面的几个问题。(最新版是 C++17,它去年刚发布;下一个版本是 C++20,它正在开发中,预计于 2020 年发布。)
+
+**Register:在你的信件《想想瓦萨号!》中,你写道:**
+
+> 在 C++11 开始基础不再完整,而 C++17 中在使基础更加稳固、规范和完整方面几乎没有改善。相反地,却增加了重要接口的复杂度,让人们需要学习的特性数量越来越多。C++ 可能在这种提议的重压之下崩溃 —— 这些提议大多数都不成熟。我们不应该花费大量的时间为专家级用户们(比如我们自己)去创建越来越复杂的东西。~~(还要考虑普通用户的学习曲线,越复杂的东西越不易普及。)~~
+
+**对新人来说,C++ 很难吗?如果是这样,你认为怎样的特性让新人更易理解?**
+
+**Stroustrup:**C++ 的有些东西对于新人来说确实很难。
+
+换句话说,C++ 中有些东西对于新人来说,比起 C 或上世纪九十年代的 C++ 更容易理解了。而难点是让大型社区专注于这些部分,并且帮助新手和普通 C++ 用户去规避那些对高级库实现提供支持的部分。
+
+我建议使用 [C++ 核心准则][4] 作为实现上述目标的一个辅助。
+
+此外,我的 “C++ 教程” 也可以帮助人们在使用现代 C++ 时走上正确的方向,而不会迷失在自上世纪九十年代以来的复杂性中,或困惑于只有专家级的用户才能理解的东西中。第二版的 “C++ 教程” 涵盖了 C++17 和部分 C++20 的内容,这本书即将要出版了。
+
+我和其他人给没有编程经验的大一新生教过 C++,只要你不去深挖编程语言的每个晦涩难懂的角落,把注意力集中到 C++ 中最主流的部分,在三个月内新可以学会 C++。
+
+“让简单的东西保持简单” 是我长期追求的目标。比如 C++11 的 `range-for` 循环:
+
+```
+for (int& x : v) ++x; // increment each element of the container v
+
+```
+
+`v` 的位置可以是任何容器。在 C 和 C 风格的 C++ 中,它可能看到的是这样:
+
+```
+for (int i=0; i103.5.134.167:49902 (ESTABLISHED)
```
-Alternatively you can check this with port number as well.
+也可以使用端口号来检查。
```
# lsof -i tcp:22
@@ -164,9 +153,9 @@ sshd 1208 root 4u IPv6 20921 0t0 TCP *:ssh (LISTEN)
sshd 11592 root 3u IPv4 27744 0t0 TCP vps.2daygeek.com:ssh->103.5.134.167:49902 (ESTABLISHED)
```
-### Method-4: Using fuser Command
+### 方法4:使用 fuser 命令
-The fuser utility shall write to standard output the process IDs of processes running on the local system that have one or more named files open.
+`fuser` 工具会将本地系统上打开了文件的进程的进程 ID 显示在标准输出中。
```
# fuser -v 22/tcp
@@ -176,11 +165,11 @@ The fuser utility shall write to standard output the process IDs of processes ru
root 49339 F.... sshd
```
-### Method-5: Using nmap Command
+### 方法5:使用 nmap 命令
-Nmap (“Network Mapper”) is an open source tool for network exploration and security auditing. It was designed to rapidly scan large networks, although it works fine against single hosts.
+`nmap`(“Network Mapper”)是一款用于网络检测和安全审计的开源工具。它最初用于对大型网络进行快速扫描,但它对于单个主机的扫描也有很好的表现。
-Nmap uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS versions) they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics.
+`nmap` 使用原始 IP 数据包来确定网络上可用的主机,这些主机的服务(包括应用程序名称和版本)、主机运行的操作系统(包括操作系统版本等信息)、正在使用的数据包过滤器或防火墙的类型,以及很多其它信息。
```
# nmap -sV -p 22 localhost
@@ -196,13 +185,13 @@ Service detection performed. Please report any incorrect results at http://nmap.
Nmap done: 1 IP address (1 host up) scanned in 0.44 seconds
```
-### Method-6: Using systemctl Command
+### 方法6:使用 systemctl 命令
-systemctl – Control the systemd system and service manager. This is the replacement of old SysV init system management and most of the modern Linux operating systems were adapted systemd.
+`systemctl` 是 systemd 系统的控制管理器和服务管理器。它取代了旧的 SysV init 系统管理,目前大多数现代 Linux 操作系统都采用了 systemd。
-**Suggested Read :**
-**(#)** [chkservice – A Tool For Managing Systemd Units From Linux Terminal][3]
-**(#)** [How To Check All Running Services In Linux][4]
+**推荐阅读:**
+**(#)** [chkservice – Linux 终端上的 systemd 单元管理工具][3]
+**(#)** [如何查看 Linux 系统上正在运行的服务][4]
```
# systemctl status sshd
@@ -223,7 +212,7 @@ Sep 23 02:09:15 vps.2daygeek.com sshd[11589]: Connection closed by 103.5.134.167
Sep 23 02:09:41 vps.2daygeek.com sshd[11592]: Accepted password for root from 103.5.134.167 port 49902 ssh2
```
-The above out will be showing the actual listening port of SSH service when you start the SSHD service recently. Otherwise it won’t because it updates recent logs in the output frequently.
+以上输出的内容显示了最近一次启动 `sshd` 服务时 `ssh` 服务的监听端口。但它不会将最新日志更新到输出中。
```
# systemctl status sshd
@@ -250,7 +239,7 @@ Sep 23 12:50:40 vps.2daygeek.com sshd[23911]: Connection closed by 95.210.113.14
Sep 23 12:50:40 vps.2daygeek.com sshd[23909]: Connection closed by 95.210.113.142 port 51666 [preauth]
```
-Most of the time the above output won’t shows the process actual port number. in this case i would suggest you to check the details using the below command from the journalctl log file.
+大部分情况下,以上的输出不会显示进程的实际端口号。这时更建议使用以下这个 `journalctl` 命令检查日志文件中的详细信息。
```
# journalctl | grep -i "openssh\|sshd"
@@ -268,7 +257,7 @@ via: https://www.2daygeek.com/how-to-find-out-which-port-number-a-process-is-usi
作者:[Prakash Subramanian][a]
选题:[lujun9972](https://github.com/lujun9972)
-译者:[译者ID](https://github.com/译者ID)
+译者:[HankChow](https://github.com/HankChow)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
@@ -278,3 +267,4 @@ via: https://www.2daygeek.com/how-to-find-out-which-port-number-a-process-is-usi
[2]: https://www.2daygeek.com/kill-terminate-a-process-in-linux-using-kill-pkill-killall-command/
[3]: https://www.2daygeek.com/chkservice-a-tool-for-managing-systemd-units-from-linux-terminal/
[4]: https://www.2daygeek.com/how-to-check-all-running-services-in-linux/
+
diff --git a/translated/tech/20180927 How to Use RAR files in Ubuntu Linux.md b/translated/tech/20180927 How to Use RAR files in Ubuntu Linux.md
new file mode 100644
index 0000000000..3521b21a8a
--- /dev/null
+++ b/translated/tech/20180927 How to Use RAR files in Ubuntu Linux.md
@@ -0,0 +1,98 @@
+如何在 Ubuntu Linux 中使用 RAR 文件
+======
+[RAR][1] 是一种非常好的归档文件格式。但相比之下 7-zip 能提供了更好的压缩率,并且默认情况下还可以在多个平台上轻松支持 Zip 文件。不过 RAR 仍然是最流行的归档格式之一。然而 [Ubuntu][2] 自带的归档管理器却不支持提取 RAR 文件,也不允许创建 RAR 文件。
+
+方法总比问题多。只要安装 `unrar` 这款由 [RARLAB][3] 提供的免费软件,就能在 Ubuntu 上支持提取RAR文件了。你也可以试安装 `rar` 来创建和管理 RAR 文件。
+
+![RAR files in Ubuntu Linux][4]
+
+### 提取 RAR 文件
+
+在未安装 unrar 的情况下,提取 RAR 文件会报出“未能提取”错误,就像下面这样(以 [Ubuntu 18.04][5] 为例):
+
+![Error in RAR extraction in Ubuntu][6]
+
+如果要解决这个错误并提取 RAR 文件,请按照以下步骤安装 unrar:
+
+打开终端并输入:
+
+```
+ sudo apt-get install unrar
+
+```
+
+安装 unrar 后,直接输入 `unrar` 就可以看到它的用法以及如何使用这个工具处理 RAR 文件。
+
+最常用到的功能是提取 RAR 文件。因此,可以**通过右键单击 RAR 文件并执行提取**,也可以借助此以下命令通过终端执行操作:
+
+```
+unrar x FileName.rar
+
+```
+
+结果类似以下这样:
+
+![Using unrar in Ubuntu][7]
+
+如果家目录中不存在对应的文件,就必须使用 `cd` 命令移动到目标目录下。例如 RAR 文件如果在 `Music` 目录下,只需要使用 `cd Music` 就可以移动到相应的目录,然后提取 RAR 文件。
+
+### 创建和管理 RAR 文件
+
+![Using rar archive in Ubuntu Linux][8]
+
+`unrar` 不允许创建 RAR 文件。因此还需要安装 `rar` 命令行工具才能创建 RAR 文件。
+
+要创建 RAR 文件,首先需要通过以下命令安装 rar:
+
+```
+sudo apt-get install rar
+
+```
+
+按照下面的命令语法创建 RAR 文件:
+
+```
+rar a ArchiveName File_1 File_2 Dir_1 Dir_2
+
+```
+
+按照这个格式输入命令时,它会将目录中的每个文件添加到 RAR 文件中。如果需要某一个特定的文件,就要指定文件确切的名称或路径。
+
+默认情况下,RAR 文件会放置在**家目录**中。
+
+以类似的方式,可以更新或管理 RAR 文件。同样是使用以下的命令语法:
+
+```
+rar u ArchiveName Filename
+
+```
+
+在终端输入 `rar` 就可以列出 RAR 工具的相关命令。
+
+### 总结
+
+现在你已经知道如何在 Ubuntu 上管理 RAR 文件了,你会更喜欢使用 7-zip、Zip 或 Tar.xz 吗?
+
+欢迎在评论区中评论。
+
+--------------------------------------------------------------------------------
+
+via: https://itsfoss.com/use-rar-ubuntu-linux/
+
+作者:[Ankush Das][a]
+选题:[lujun9972](https://github.com/lujun9972)
+译者:[HankChow](https://github.com/HankChow)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]: https://itsfoss.com/author/ankush/
+[1]: https://www.rarlab.com/rar_file.htm
+[2]: https://www.ubuntu.com/
+[3]: https://www.rarlab.com/
+[4]: https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/09/rar-ubuntu-linux.png
+[5]: https://itsfoss.com/things-to-do-after-installing-ubuntu-18-04/
+[6]: https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/08/extract-rar-error.jpg
+[7]: https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/08/unrar-rar-extraction.jpg
+[8]: https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/09/rar-update-create.jpg
+