Merge remote-tracking branch 'LCTT/master'

This commit is contained in:
Xingyu Wang 2020-08-29 23:10:47 +08:00
commit 4b390a93e3
4 changed files with 256 additions and 258 deletions

View File

@ -1,76 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Decentralized Messaging App Riot Rebrands to Element)
[#]: via: (https://itsfoss.com/riot-to-element/)
[#]: author: (John Paul https://itsfoss.com/author/john/)
Decentralized Messaging App Riot Rebrands to Element
======
Riot is/was a decentralized instant messaging app based on the open source Matrix protocol.
In late June, Riot (the instant messaging client) announced that they would be changing their name. Yesterday, they revealed that their new name is [Element][1]. Lets see more details on why Riot changed its name and what else is being changed.
### Why change the name from Riot to Element?
![][2]
Before we get to the most recent announcement, let us take a look at why they changed their name in the first place.
According to a [blog post][3] dated June 23rd, the group had three reasons for the name change.
First, they stated that “a certain large games company” had repeatedly blocked them from trademarking the Riot and Riot.im product names. (If I had to guess, they are probably referring to this [“games company”][4].)
Second, they originally chose the name Riot to “evoke something disruptive and vibrant”. They are worried that people are instead thinking that the app is “focused on violence”. I imagine that current world events have not helped that situation.
Thirdly, they want to clear up any confusion created by the many brand names involved with Riot. For example, Riot is created by a company named New Vector, while the Riot is hosted on Modular which is also a product of New Vector. They want to simplify their naming system to avoid confusing potential customers. When people look for a messaging solution, they want them to only have to look for one name: Element.
### Element is everywhere
![][5]
As of July 15th, the name of the app and the name of the company has been changed to Element. Their Matrix hosting service will now be called Element Matrix Services. Their announcement sums it up nicely:
> “For those discovering us for the first time: Element is the flagship secure collaboration app for the decentralised Matrix communication network. Element lets you own your own end-to-end encrypted chat server, while still connecting to everyone else in the wider Matrix network.
They chose the name Element because it “reflects the emphasis on simplicity and clarity that we aimed for when designing RiotX; a name that highlights our single-minded mission to make Element the most elegant and usable mainstream comms app imaginable”. They also said they wanted a name “evokes the idea of data ownership and self-sovereignty”. They also thought it was a cool name.
### More than just a name change
![][6]
The recent announcement also makes it clear that this move is more than just a simple name change. Element has also released its “next generation Matrix client for Android”. The client was formerly known as RiotX and is now renamed Element. (What else?) It is a complete rewrite of the former client and now supports VoIP calls and widgets. Element will also be available on iOS with support for iOS 13 with “entirely new push notification support”.
The Element Web client has also received some love with a UI update and a new easier to read font. They have also “rewritten the Room List control adding in room previews(!!), alphabetic ordering, resizable lists, improved notification UI and more”. They have also started working to improve end-to-end encryption.
### Final thought
The people over at Element are taking a big step by making a major name change like this. They may lose some customers in the short term. (This could mainly be due to not being aware of the name change for whatever reason or not liking change.) However in the long run the brand simplification will help them stand out from the crowd.
The only negative note Ill mention is that this is the third name change they have made in the apps history. It was originally named Vector when it was released in 2016. The name was changed to Riot later that year. Hopefully, Element is here to stay.
If you found this article interesting, please take a minute to share it on social media, Hacker News, or [Reddit][7].
--------------------------------------------------------------------------------
via: https://itsfoss.com/riot-to-element/
作者:[John Paul][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/john/
[b]: https://github.com/lujun9972
[1]: https://element.io/
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/riot-to-element.png?ssl=1
[3]: https://element.io/blog/the-world-is-changing/
[4]: https://en.wikipedia.org/wiki/Riot_Games
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/element-desktop.jpg?ssl=1
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/element-apps.jpg?ssl=1
[7]: http://reddit.com/r/linuxusersgroup

View File

@ -1,182 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (SCP users migration guide to rsync)
[#]: via: (https://fedoramagazine.org/scp-users-migration-guide-to-rsync/)
[#]: author: (chasinglogic https://fedoramagazine.org/author/chasinglogic/)
SCP users migration guide to rsync
======
![][1]
As part of the [8.0 pre-release announcement,][2] the OpenSSH project stated that they consider the scp protocol outdated, inflexible, and not readily fixed. They then go on to recommend the use of sftp or rsync for file transfer instead.
Many users grew up on the _scp_ command, however, and so are not familiar with rsync. Additionally, rsync can do much more than just copy files, which can give a beginner the impression that its complicated and opaque. Especially when broadly the scp flags map directly to the cp flags while the rsync flags do not.
This article will provide an introduction and transition guide for anyone familiar with scp. Lets jump into the most common scenarios: Copying Files and Copying Directories.
### Copying files
For copying a single file, the scp and rsync commands are effectively equivalent. Lets say you need to ship _foo.txt_ to your home directory on a server named _server._
```
$ scp foo.txt me@server:/home/me/
```
The equivalent rsync command requires only that you type rsync instead of scp:
```
$ rsync foo.txt me@server:/home/me/
```
### Copying directories
For copying directories, things do diverge quite a bit and probably explains why rsync is seen as more complex than scp. If you want to copy the directory _bar_ to _server_ the corresponding scp command looks exactly like the cp command except for specifying ssh information:
```
$ scp -r bar/ me@server:/home/me/
```
With rsync, there are more considerations, as its a more powerful tool. First, lets look at the simplest form:
```
$ rsync -r bar/ me@server:/home/me/
```
Looks simple right? For the simple case of a directory that contains only directories and regular files, this will work. However, rsync cares a lot about sending files exactly as they are on the host system. Lets create a slightly more complex, but not uncommon, example.
```
# Create a multi-level directory structure
$ mkdir -p bar/baz
# Create a file at the root directory
$ touch bar/foo.txt
# Now create a symlink which points back up to this file
$ cd bar/baz
$ ln -s ../foo.txt link.txt
# Return to our original location
$ cd -
```
We now have a directory tree that looks like the following:
```
bar
├── baz
│ └── link.txt -> ../foo.txt
└── foo.txt
1 directory, 2 files
```
If we try the commands from above to copy bar, well notice very different (and surprising) results. First, lets give scp a go:
```
$ scp -r bar/ me@server:/home/me/
```
If you ssh into your server and look at the directory tree of bar youll notice an important and subtle difference from your host system:
```
bar
├── baz
│ └── link.txt
└── foo.txt
1 directory, 2 files
```
Note that _link.txt_ is no longer a symlink. It is now a full-blown copy of _foo.txt_. This might be surprising behavior if youre used to _cp_. If you did try to copy the _bar_ directory using _cp -r_, you would get a new directory with the exact symlinks that _bar_ had. Now if we try the same rsync command from before well get a warning:
```
$ rsync -r bar/ me@server:/home/me/
skipping non-regular file "bar/baz/link.txt"
```
Rsync has warned us that it found a non-regular file and is skipping it. Because you didnt tell it to copy symlinks, its ignoring them. Rsync has an extensive manual section titled “SYMBOLIC LINKS” that explains all of the possible behavior options available to you. For our example, we need to add the links flag.
```
$ rsync -r --links bar/ me@server:/home/me/
```
On the remote server we see that the symlink was copied over as a symlink. Note that this is different from how scp copied the symlink.
```
bar/
├── baz
│ └── link.txt -> ../foo.txt
└── foo.txt
1 directory, 2 files
```
To save some typing and take advantage of more file-preserving options, use the archive (-a for short) flag whenever copying a directory. The archive flag will do what most people expect as it enables recursive copy, symlink copy, and many other options.
```
$ rsync -a bar/ me@server:/home/me/
```
The rsync man page has in-depth explanations of what the archive flag enables if youre curious.
### Caveats
There is one caveat, however, to using rsync. Its much easier to specify a non-standard ssh port with scp than with rsync. If _server_ was using port 8022 SSH connections, for instance, then those commands would look like this:
```
$ scp -P 8022 foo.txt me@server:/home/me/
```
With rsync, you have to specify the “remote shell” command to use. This defaults to _ssh_. You do so using the **-e flag.
```
$ rsync -e 'ssh -p 8022' foo.txt me@server:/home/me/
```
Rsync does use your ssh config; however, so if you are connecting to this server frequently, you can add the following snippet to your _~/.ssh/config_ file. Then you no longer need to specify the port for the rsync or ssh commands!
```
Host server
Port 8022
```
Alternatively, if every server you connect to runs on the same non-standard port, you can configure the _RSYNC_RSH_ environment variable.
### Why else should you switch to rsync?
Now that weve covered the everyday use cases and caveats for switching from scp to rsync, lets take some time to explore why you probably want to use rsync on its own merits. Many people have made the switch to rsync long before now on these merits alone.
#### In-flight compression
If you have a slow or otherwise limited network connection between you and your server, rsync can spend more CPU cycles to save network bandwidth. It does this by compressing data before sending it. Compression can be enabled with the -z flag.
#### Delta transfers
Rsync also only copies a file if the target file is different than the source file. This works recursively through directories. For instance, if you took our final bar example above and re-ran that rsync command multiple times, it would do no work after the initial transfer. Using rsync even for local copies is worth it if you know you will repeat them, such as backing up to a USB drive, for this feature alone as it can save a lot of time with large data sets.
#### Syncing
As the name implies, rsync can do more than just copy data. So far, weve only demonstrated how to copy files with rsync. If you instead want rsync to make the target directory look like your source directory, you can add the delete flag to rsync. The delete flag makes it so rsync will copy files from the source directory which dont exist on the target directory. Then it will remove files on the target directory which do not exist in the source directory. The result is the target directory is identical to the source directory. By contrast, scp will only ever add files to the target directory.
### Conclusion
For simple use cases, rsync is not significantly more complicated than the venerable scp tool. The only significant difference being the use of -a instead of -r for recursive copying of directories. However, as we saw rsyncs -a flag behaves more like cps -r flag than scps -r flag does.
Hopefully, with these new commands, you can speed up your file transfer workflow!
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/scp-users-migration-guide-to-rsync/
作者:[chasinglogic][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://fedoramagazine.org/author/chasinglogic/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2020/07/scp-rsync-816x345.png
[2]: https://lists.mindrot.org/pipermail/openssh-unix-dev/2019-March/037672.html

View File

@ -0,0 +1,74 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Decentralized Messaging App Riot Rebrands to Element)
[#]: via: (https://itsfoss.com/riot-to-element/)
[#]: author: (John Paul https://itsfoss.com/author/john/)
去中心化的消息应用 Riot 改名为 Element
======
Riot 曾经是,现在也是一款基于开源 Matrix 协议的去中心化即时通讯应用。
6 月底Riot 即时通讯客户端宣布将改名。他们透露,他们的新名字是 [Element][1]。让我们来看看 Riot 为什么要改名,还有哪些要改。
### 为什么从 Riot 改名为 Element
![][2]
在说到最新的公告之前,我们先来看看他们当初为什么要改名。
根据 6 月 23 日的一篇[博客文章][3],该组织改名有三个原因。
首先,他们表示“某大型游戏公司”曾多次阻止他们注册 Riot 和 Riot.im 产品名称的商标。如果要我猜的话,他们可能指的就是这家[“游戏公司”][4])。
其次,他们选择 Riot 这个名字的初衷是为了“唤起一些破坏性和活力的东西”。他们担心人们反而认为这个应用是“专注于暴力”。我想,当前的情形下,这个名字并不算好。
第三,他们希望澄清 Riot 涉及的众多品牌名称所造成的混乱。例如Riot 是由一家名为 New Vector 的公司创建的,而 Riot 是托管在 Modular 上Modular 也是 New Vector 的产品。他们希望简化他们的命名系统以避免混淆潜在客户。当人们寻找消息解决方案时他们希望他们只需要寻找一个名字Element。
### 元素即一切
![][5]
从 7 月 15 日开始,该应用的名称和公司的名称已经改为 Element元素。他们的 Matrix 托管服务现在将被称为 Element Matrix Services。他们的公告很好地总结了这一点。
> “对于那些第一次发现我们的人来说Element 是 Matrix 通信网络中的旗舰级安全协作应用。Element 让你拥有自己的端到端加密聊天服务器,同时还能与更广泛的 Matrix 网络中的其他人连接。”
他们之所以选择 Element 这个名字,是因为它“反映了我们在设计 RiotX 时对简单和清晰的强调;这个名字突出了我们一心一意将 Element 打造成可以想象的最优雅和最实用的主流通讯应用的使命”。他们还说,他们想要一个“能唤起数据所有权和自我主权的概念”的名字。他们还认为这是一个很酷的名字。
### 除了改个名之外
![][6]
最近的公告也表明此举不仅仅是简单的改名。Element 还发布了“新一代安卓版 Matrix 客户端”。该客户端的前身是 RiotX现在改名为 Element。还有呢它对以前的客户端进行了彻底的重写现在支持 VoIP 通话和小部件。Element 还将在 iOS 上推出,支持 iOS 13并提供“全新的推送通知支持”。
Element Web 客户端也得到了一些关爱,更新了 UI 和新的更容易阅读的字体。他们还“重写了房间列表控件 —— 增加了房间预览(!!)、按字母顺序排列、可调整列表大小、改进的通知用户界面等”。他们还开始努力改进端到端加密。
### 最后思考
Element 公司的人迈出了一大步,做出了这样的重大改名。他们可能会在短期内失去一些客户。(这可能主要是由于出于某种原因没有意识到名称的改变,或者不喜欢改变)。然而从长远来看,品牌简化将帮助他们脱颖而出。
我唯一要提到的负面说明是,这是他们在该应用历史上的第三次改名。在 2016 年发布时,它最初被命名为 Vector。当年晚些时候改名为 Riot。希望 Element 能一直用下去。
--------------------------------------------------------------------------------
via: https://itsfoss.com/riot-to-element/
作者:[John Paul][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/john/
[b]: https://github.com/lujun9972
[1]: https://element.io/
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/riot-to-element.png?ssl=1
[3]: https://element.io/blog/the-world-is-changing/
[4]: https://en.wikipedia.org/wiki/Riot_Games
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/element-desktop.jpg?ssl=1
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/element-apps.jpg?ssl=1
[7]: http://reddit.com/r/linuxusersgroup

View File

@ -0,0 +1,182 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (SCP users migration guide to rsync)
[#]: via: (https://fedoramagazine.org/scp-users-migration-guide-to-rsync/)
[#]: author: (chasinglogic https://fedoramagazine.org/author/chasinglogic/)
scp 用户的 rsync 迁移指南
======
![][1]
在 [SSH 8.0 预发布公告][2]中OpenSSH 项目表示,他们认为 scp 协议已经过时,不灵活,而且不容易修复,然后他们继续推荐使用 `sftp``rsync` 来进行文件传输。
然而,很多用户都是从小用着 `scp` 命令长大的,所以对 `rsync` 并不熟悉。此外,`rsync` 可以做的事情也远不止复制文件,这可能会给菜鸟们留下复杂和不透明的印象。尤其是,`scp` 命令的标志大体上可以直接对应到 `cp` 命令的标志,而 `rsync` 命令的标志却和它大相径庭。
本文将为熟悉 `scp` 的人提供一个介绍和过渡的指南。让我们跳进最常见的场景:复制文件和复制目录。
### 复制文件
对于复制单个文件而言,`scp` 和 `rsync` 命令实际上是等价的。比方说,你需要把 `foo.txt` 传到一个名为 `server` 的服务器上你的主目录下:
```
$ scp foo.txt me@server:/home/me/
```
相应的 `rsync` 命令只需要输入 `rsync` 取代 `scp`
```
$ rsync foo.txt me@server:/home/me/
```
### 复制目录
对于复制目录,就确实有了很大的分歧,这也解释了为什么 `rsync` 会被认为比 `scp` 更复杂。如果你想把 `bar` 目录复制到 `server` 服务器上,除了指定 `ssh` 信息外,相应的 `scp` 命令和 `cp` 命令一模一样。
```
$ scp -r bar/ me@server:/home/me/
```
对于 `rsync`,考虑的因素比较多,因为它是一个比较强大的工具。首先,我们来看一下最简单的形式:
```
$ rsync -r bar/ me@server:/home/me/
```
看起来很简单吧?对于只包含目录和普通文件的简单情况,这就可以了。然而,`rsync` 更在意发送与主机系统中一模一样的文件。让我们来创建一个稍微复杂一些,但并不罕见的例子:
```
# 创建多级目录结构
$ mkdir -p bar/baz
# 在其根目录下创建文件
$ touch bar/foo.txt
# 现在创建一个符号链接指回到该文件
$ cd bar/baz
$ ln -s ../foo.txt link.txt
# 返回原位置
$ cd -
```
现在我们有了一个如下的目录树:
```
bar
├── baz
│ └── link.txt -> ../foo.txt
└── foo.txt
1 directory, 2 files
```
如果我们尝试上面的命令来复制 `bar`,我们会注意到非常不同的(并令人惊讶的)结果。首先,我们来试试 `scp`
```
$ scp -r bar/ me@server:/home/me/
```
如果你 `ssh` 进入你的服务器,看看 `bar` 的目录树,你会发现它和你的主机系统有一个重要而微妙的区别:
```
bar
├── baz
│ └── link.txt
└── foo.txt
1 directory, 2 files
```
请注意,`link.txt` 不再是一个符号链接,它现在是一个完整的 `foo.txt` 副本。如果你习惯于使用 `cp`,这可能会是令人惊讶的行为。如果你尝试使用 `cp -r` 复制 `bar` 目录,你会得到一个新的目录,里面的符号链接和 `bar` 的一样。现在如果我们尝试使用之前的 `rsync` 命令,我们会得到一个警告:
```
$ rsync -r bar/ me@server:/home/me/
skipping non-regular file "bar/baz/link.txt"
```
`rsync` 警告我们它发现了一个非常规的文件,并正在跳过它。因为你没有告诉它可以复制符号链接,所以它忽略了它们。`rsync` 在手册中有一节“符号链接”,解释了所有可能的行为选项。在我们的例子中,我们需要添加 `-links` 标志:
```
$ rsync -r --links bar/ me@server:/home/me/
```
在远程服务器上,我们看到这个符号链接是作为一个符号链接复制过来的。请注意,这与 `scp` 复制符号链接的方式不同。
```
bar/
├── baz
│ └── link.txt -> ../foo.txt
└── foo.txt
1 directory, 2 files
```
为了省去一些打字工作,并利用更多的文件保护选项,在复制目录时可以使用 `-archive`(简称 `-a`)标志。该归档标志将做大多数人所期望的事情,因为它可以实现递归复制、符号链接复制和许多其他选项。
```
$ rsync -a bar/ me@server:/home/me/
```
如果你感兴趣的话,`rsync` 手册页有关于存档标志的深入解释。
### 注意事项
不过,使用 `rsync` 有一个注意事项。使用 `scp` 比使用 `rsync` 更容易指定一个非标准的 ssh 端口。例如,如果 `server` 使用 8022 端口的 SSH 连接,那么这些命令就会像这样:
```
$ scp -P 8022 foo.txt me@server:/home/me/
```
而在使用 `rsync` 时,你必须指定要使用的“远程 shell”命令默认是 `ssh`。你可以使用 `-e` 标志来指定。
```
$ rsync -e 'ssh -p 8022' foo.txt me@server:/home/me/
```
`rsync` 会使用你的 `ssh` 配置;但是,如果你经常连接到这个服务器,你可以在你的 `~/.ssh/config` 文件中添加以下代码。这样你就不需要再为 `rsync``ssh` 命令指定端口了!
```
Host server
Port 8022
```
另外,如果你连接的每一台服务器都在同一个非标准端口上运行,你还可以配置 `RSYNC_RSH` 环境变量。
### 为什么你还是应该切换到 rsync
现在我们已经介绍了从 `scp` 切换到 `rsync` 的日常使用案例和注意事项,让我们花一些时间来探讨一下为什么你可能想要使用 `rsync` 的优点。很多人在很久以前就已经开始使用 `rsync` 了,就是因为这些优点。
#### 即时压缩
如果你和服务器之间的网络连接速度较慢或有限,`rsync` 可以花费更多的 CPU 处理能力来节省网络带宽。它通过在发送数据之前对数据进行即时压缩来实现。压缩可以用 `-z` 标志来启用。
#### 差量传输
`rsync` 也只在目标文件与源文件不同的情况下复制文件。这可以在目录中递归地工作。例如,如果你拿我们上面的最后一个 `bar` 的例子,并多次重新运行那个 `rsync` 命令,那么在最初的传输之后就不会有任何传输。如果你知道你会重复使用这些命令,例如备份到 U 盘,那么使用 `rsync` 即使是进行本地复制也是值得的,因为这个功能可以节省处理大型数据集的大量的时间。
#### 同步
顾名思义,`rsync` 可以做的不仅仅是复制数据。到目前为止,我们只演示了如何使用 `rsync` 复制文件。如果你想让 `rsync` 把目标目录变成源目录的样子,你可以在 `rsync` 中添加 `-delete` 标志。这个删除标志使得 `rsync` 将从源目录中复制不存在于目标目录中的文件,然后它将删除目标目录中不存在于源目录中的文件。结果就是目标目录和源目录完全一样。相比之下,`scp` 只会在目标目录下添加文件。
### 结论
对于简单的使用情况,`rsync` 并不比老牌的 `scp` 工具复杂多少。唯一显著的区别是在递归复制目录时使用 `-a` 而不是 `-r`。然而,正如我们看到的,`rsync` 的 `-a` 标志比 `scp``-r` 标志更像 `cp``-r` 标志。
希望通过这些新命令,你可以加快你的文件传输工作流程。
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/scp-users-migration-guide-to-rsync/
作者:[chasinglogic][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://fedoramagazine.org/author/chasinglogic/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2020/07/scp-rsync-816x345.png
[2]: https://lists.mindrot.org/pipermail/openssh-unix-dev/2019-March/037672.html