Merge remote-tracking branch 'LCTT/master'

This commit is contained in:
Xingyu Wang 2019-12-14 14:45:53 +08:00
commit 5a02694b5f
9 changed files with 617 additions and 168 deletions

View File

@ -1,8 +1,8 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11673-1.html)
[#]: subject: (24 sysadmin job interview questions you should know)
[#]: via: (https://opensource.com/article/19/7/sysadmin-job-interview-questions)
[#]: author: (DirectedSoul https://opensource.com/users/directedsoul)
@ -10,11 +10,11 @@
24 个必知必会的系统管理员面试问题
======
> 即将进行系统管理员工作面试吗? 阅读本文,了解你可能会遇到的一些问题以及可能的答案。
> 即将进行系统管理员工作面试吗?阅读本文,了解你可能会遇到的一些问题以及可能的答案。
![Question and answer.][1]
![](https://img.linux.net.cn/data/attachment/album/201912/14/124906g3vrkr3vrvqdkw7f.jpg)
作为一个经常与计算机打交道的极客,在硕士毕业后在 IT 行业选择我的职业是很自然的选择。因此,我认为走上系统管理员之路是正确的路径。在我的职业生涯中,我对求职面试过程非常熟悉。现在来看一下该职位的预期、职业发展道路,以及一系列常见问题和我的回答。
作为一个经常与计算机打交道的极客,在硕士毕业后在 IT 行业选择我的职业是很自然的选择。因此,我认为走上系统管理员之路是正确的路径。在我的职业生涯中,我对求职面试过程非常熟悉。现在来看一下该职位的预期、职业发展道路,以及一系列常见面试问题及我的回答。
### 系统管理员的典型任务和职责
@ -22,13 +22,13 @@
你是对的。现在,一般来说,让我们看一下典型的系统管理员的日常任务。根据公司的需求和人员的技能水平,系统管理员的任务从管理台式机、笔记本电脑、网络和服务器到设计组织的 IT 策略不等。有时,系统管理员甚至负责购买和订购新的 IT 设备。
那些寻求系统管理工作作为其职业道路的人可能会发现,由于 IT 领域的快速变化是不可避免的,因此难以保持其技能和知识的最新状态。所有人都会想到的下一个自然而然的问题是 IT 专业人员如何掌握最新的更新和技能。
那些寻求系统管理工作作为其职业发展道路的人可能会发现,由于 IT 领域的快速变化是不可避免的,因此难以保持其技能和知识的最新状态。所有人都会想到的下一个自然而然的问题是 IT 专业人员如何掌握最新的更新和技能。
### 小意思
### 简单的问题
这是你将遇到的一些最基本的问题,以及我的答案:
1、在 *nix 服务器上登录后键入的前五个命令是什么?
**1、\*nix 服务器上登录后键入的前五个命令是什么?**
> * `lsblk` 以查看所有的块设备信息
> * `who` 查看谁登录到服务器
@ -36,21 +36,21 @@
> * `df -khT` 以查看服务器上可用的磁盘容量
> * `netstat` 以查看哪些 TCP 网络连接处于活动状态
2、如何使进程在后台运行这样做的好处是什么
**2、如何使进程在后台运行这样做的好处是什么**
> 你可以通过在命令末尾添加特殊字符 `` 来使进程在后台运行。通常,执行时间太长并且不需要用户交互的应用程序放到后台,以便我们可以在终端中继续工作。([引文][2]
> 你可以通过在命令末尾添加特殊字符 `` 来使进程在后台运行。通常,执行时间太长并且不需要用户交互的应用程序可以放到后台,以便我们可以在终端中继续工作。([引文][2]
3、以 root 用户身份运行这些命令是好事还是坏事?
**3、以 root 用户身份运行这些命令是好事还是坏事?**
> 由于两个主要问题,以 root 身份运行(任何命令)是不好的。第一个是*风险*。当你以 **root** 身份登录时,无法避免你犯粗心大意的错误。如果你尝试以带有潜在危害的方式更改系统,则需要使用 `sudo`,它会引入一个暂停(在你输入密码时),以确保你不会犯错。
> 由于两个主要问题,以 root 身份运行(任何命令)是不好的。第一个是*风险*。当你以 **root** 身份登录时,无法避免你由于粗心大意而犯错。如果你尝试以带有潜在危害的方式更改系统,则需要使用 `sudo`,它会引入一个暂停(在你输入密码时),以确保你不会犯错。
>
> 第二个原因是*安全*。如果你不知道管理员用户的登录信息,则系统更难被攻击。拥有 root 的访问权限意味着你已经拥有管理员凭据工作集的一半
> 第二个原因是*安全*。如果你不知道管理员用户的登录信息,则系统更难被攻击。拥有 root 的访问权限意味着你已经能够进行管理员身份下的一半工作任务
4、`rm` 和 `rm -rf` 有什么区别?
**4、`rm` 和 `rm -rf` 有什么区别?**
> `rm` 命令本身仅删除指明的文件(而不删除目录)。使用 `-rf` 标志,你添加了两个附加功能:`-r`、`-R` 或 `--recursive` 标志递归删除目录的内容,包括隐藏的文件和子目录;而 `-f``--force` 标志使 `rm` 忽略不存在的文件,并且从不提示你进行确认。
> `rm` 命令本身仅删除指明的文件(而不删除目录)。使用 `-rf` 标志,你添加了两个附加功能:`-r`(或等价的 `-R`、`--recursive`)标志可以递归删除目录的内容,包括隐藏的文件和子目录;而 `-f`(或 `--force`标志使 `rm` 忽略不存在的文件,并且从不提示你进行确认。
5、有一个大小约为 15GB 的 `Compress.tgz` 文件。你如何列出其内容,以及如何仅提取出特定文件?
**5、有一个大小约为 15GB 的 `Compress.tgz` 文件。你如何列出其内容,以及如何仅提取出特定文件?**
> 要列出文件的内容:
>
@ -60,92 +60,91 @@
>
> `tar xf archive.tgz filename`
### 中等意思
### 有点难度的问题
这是你可能会遇到的一些较难的问题,以及我的答案:
6、什么是 RAID什么是 RAID 0、RAID 1、RAID 5、RAID 6 和 RAID 10
**6、什么是 RAID什么是 RAID 0、RAID 1、RAID 5、RAID 6 和 RAID 10**
> RAID<ruby>廉价磁盘冗余阵列<rt>Redundant Array of Inexpensive Disks</rt></ruby>)是一种用于提高数据存储性能和/或可靠性的技术。RAID 级别为:
>
> * RAID 0也称为磁盘条带化这是一种分解文件并将数据分布在 RAID 组中所有磁盘驱动器上的技术。它没有防止磁盘失败的保障。([引文][3]
> * RAID 1一种流行的磁盘子系统通过在两个驱动器上写入相同的数据来提高安全性。 RAID 1 被称为*镜像*它不会提高写入性能但读取性能可能会提高到每个磁盘性能的总和。另外如果一个驱动器发生故障则使用第二个驱动器发生故障的驱动器要手动更换。更换后RAID 控制器将可工作的驱动器的内容复制到新驱动器上。
> * RAID 1一种流行的磁盘子系统通过在两个驱动器上写入相同的数据来提高安全性。RAID 1 被称为*镜像*,它不会提高写入性能,但读取性能可能会提高到每个磁盘性能的总和。另外,如果一个驱动器发生故障,则使用第二个驱动器,发生故障的驱动器要手动更换。更换后RAID 控制器将可工作的驱动器的内容复制到新驱动器上。
> * RAID 5一种磁盘子系统可通过计算奇偶校验数据来提高安全性和提高速度。RAID 5 通过跨三个或更多驱动器交错数据(条带化)来实现此目的。在单个驱动器发生故障时,后续读取可以从分布式奇偶校验计算出,从而不会丢失任何数据。
> * RAID 6通过添加另一个奇偶校验块来扩展 RAID 5。此级别至少需要四个磁盘并且可以在任何两个并发磁盘故障的情况下继续执行读/写操作。RAID 6 不会对读取操作造成性能损失,但由于与奇偶校验计算相关的开销,因此确实会对写入操作造成性能损失。
> * RAID 10RAID 10 也称为 RAID 1 + 0它结合了磁盘镜像和磁盘条带化功能来保护数据。它至少需要四个磁盘并且跨镜像对对数据进行条带化。只要每个镜像对中的一个磁盘起作用就可以检索数据。如果同一镜像对中的两个磁盘发生故障则所有数据将丢失因为带区集中没有奇偶校验。[引文][4]
7、`ping` 命令使用哪个端口?
**7、`ping` 命令使用哪个端口?**
> `ping` 命令使用 ICMP。具体来说它使用 ICMP 回显请求和 ICMP 回显应答包。
> `ping` 命令使用 ICMP。具体来说它使用 ICMP 回显请求和应答包。
>
> ICMP 不使用 UDP 或 TCP 通信服务:相反,它使用原始的 IP 通信服务。这意味着ICMP 消息直接承载在 IP 数据报数据字段中。
8、路由器和网关之间有什么区别 什么是默认网关?
**8、路由器和网关之间有什么区别什么是默认网关**
> *路由器*描述的是一种通用技术功能(第 3 层转发)或用于该目的的硬件设备,而*网关*描述的是本地网段的功能(提供到其他地方的连接性)。你还可以说“将路由器设置为网关”。另一个术语是“跳”,它描述了子网之间的转发。
>
>术语*默认网关*表示局域网上的路由器,它的责任是作为向局域网外部计算机通信的第一个联系点。
> 术语*默认网关*表示局域网上的路由器,它的责任是作为对局域网外部的计算机通信的第一个联系点。
9、解释一下 Linux 的引导过程。
**9、解释一下 Linux 的引导过程。**
> BIOS -> 主引导记录MBR -> GRUB -> 内核 -> 初始化 -> 运行级
> BIOS -> 主引导记录MBR -> GRUB -> 内核 -> 初始化 -> 运行级
10、服务器启动时如何检查错误消息
**10、服务器启动时如何检查错误消息**
> 内核消息始终存储在 kmsg 缓冲区中,可通过 `dmesg` 命令查看。
>
> 引导的问题和错误要求系统管理员结合某些特定命令来查看某些重要文件,这些文件不同版本的 Linux 处理不同:
> 引导出现的问题和错误要求系统管理员结合某些特定命令来查看某些重要文件,这些文件不同版本的 Linux 处理方式不同:
>
> * `/var/log/boot.log` 是系统引导日志,其中包含系统引导过程中展开的所有内容。
> * `/var/log/messages` 存储全局系统消息,包括系统引导期间记录的消息。
> * `/var/log/dmesg` 包含内核环形缓冲区信息。
11、符号链接和硬链接有什么区别
**11、符号链接和硬链接有什么区别**
> *符号链接*或*软链接*实际是是到原始文件的链接,而*硬链接*是原始文件的镜像副本。如果删除原始文件,则该软链接就没有用了,因为它指向的文件不存在了。如果是硬链接,则完全相反。如果删除原始文件,则硬链接仍然包含原始文件中的数据。([引文][5]
> *符号链接**软链接*)实际是到原始文件的链接,而*硬链接*是原始文件的镜像副本。如果删除原始文件,则该软链接就没有用了,因为它指向的文件不存在了。如果是硬链接,则完全相反。如果删除原始文件,则硬链接仍然包含原始文件中的数据。([引文][5]
12、如何更改内核参数你可能需要调整哪些内核选项
**12、如何更改内核参数你可能需要调整哪些内核选项**
> 要在类 Unix 系统中设置内核参数,请首先编辑文件 `/etc/sysctl.conf`。进行更改后,保存文件并运行 `sysctl -p` 命令。此命令使更改永久生效,而无需重新启动计算机
13、解释一下 `/proc` 文件系统。
**13、解释一下 `/proc` 文件系统。**
> `/proc` 文件系统是虚拟的,并提供有关内核、硬件和正在运行的进程的详细信息。由于 `/proc` 包含虚拟文件,因此称为“虚拟文件系统”。这些虚拟文件具有独特性。其中大多数为零字节。
> `/proc` 文件系统是虚拟的,并提供有关内核、硬件和正在运行的进程的详细信息。由于 `/proc` 包含虚拟文件,因此称为“虚拟文件系统”。这些虚拟文件具有独特性。其中大多数显示为零字节。
>
> 虚拟文件,例如 `/proc/interrupts`、`/proc/meminfo`、`/proc/mounts` 和 `/proc/partitions`,提供了系统硬件的最新信息。其他诸如 `/proc/filesystems``/proc/sys` 目录提供系统配置信息和接口。
14、如何在没有密码的情况下以其他用户身份运行脚本
**14、如何在没有密码的情况下以其他用户身份运行脚本**
> 例如,如果你可以编辑 sudoers 文件(例如 `/private/etc/sudoers`),则可以使用 `visudo` 添加以下[内容][2]
>
> `user1 ALL =user2NOPASSWD/opt/scripts/bin/generate.sh`
>
15、什么是 UID 0 toor 帐户?是被入侵了么?
**15、什么是 UID 0 toor 帐户?是被入侵了么?**
> `toor` 用户是备用的超级用户帐户,其中 `toor``root` 反向拼写。它预期与非标准 shell 一起使用,因此 `root` 的默认 shell 不需要更改。
>
> 此用途很重要。这些 shell 不是基本发行版的一部分,而是从 ports 或软件包安装的,它们安装在 `/usr/local/bin` 中,默认情况下,位于其他文件系统上。如果 root 的 shell 位于 `/usr/local/bin` 中并且未挂载包含 `/usr/local/bin` 的文件系统,则 root 无法登录以解决问题,并且系统管理员必须重新启动进入单用户模式来输入 shell 程序的路径。
> 此用途很重要。这些 shell 不是基本发行版的一部分,而是从 ports 或软件包安装的,它们安装在 `/usr/local/bin` 中,默认情况下,位于其他文件系统上。如果 root 的 shell 位于 `/usr/local/bin`并且未挂载包含 `/usr/local/bin` 的文件系统,则 root 无法登录以解决问题,并且系统管理员必须重新启动进入单用户模式来输入 shell 程序的路径。
### 小目标?
### 更难的问题
这是你可能会遇到的甚至更困难的问题:
16、`tracert` 如何工作,使用什么协议?
**16、`tracert` 如何工作,使用什么协议?**
> 命令 `tracert`(或 `traceroute`,具体取决于操作系统)使你可以准确地看到在连接到最终目的地的连接链条中触及的路由器。如果你遇到无法连接或无法 `ping` 通最终目的地的问题,则可以使用 `tracert` 来帮助你确定连接链在何处停止。 [引文][6]
> 命令 `tracert`(或 `traceroute`,具体取决于操作系统)使你可以准确地看到在连接到最终目的地的连接链条中触及的路由器。如果你遇到无法连接或无法 `ping` 通最终目的地的问题,则可以使用 `tracert` 来帮助你确定连接链在何处停止。([引文][6]
>
> 通过此信息你可以联系正确的人无论是你自己的防火墙、ISP、目的地的 ISP 还是中间的某个位置。 `tracert` 命令像 `ping` 一样使用 ICMP 协议,但也可以使用 TCP 三步握手的第一步来发送 SYN 请求以进行响应。
17、使用 `chroot` 的主要优点是什么?我们何时以及为什么使用它?在 chroot 环境中,`mount /dev`、`mount /proc` 和 `mount /sys` 命令的作用是什么?
**17、使用 `chroot` 的主要优点是什么?我们何时以及为什么使用它?在 chroot 环境中,`mount /dev`、`mount /proc` 和 `mount /sys` 命令的作用是什么?**
> chroot 环境的优点是文件系统与物理主机是隔离的,因为 chroot 在文件系统内部有一个单独的文件系统。区别在于 `chroot` 使用新创建的根目录(`/`)作为其根目录。
>
> chroot 监狱可让你将进程及其子进程与系统其余部分隔离。它仅应用于不以 root 身份运行的进程,因为 root 用户可以轻松地脱离监狱。
>
> 该思路是创建一个目录树,在其中复制或链接运行该进程所需的所有系统文件。然后,你可以使用 `chroot()` 系统调用来告诉它根目录现在位于此新树的基点上,然后启动在该 chroot 环境中运行的进程。由于该命令因此而无法引用修改后的根目录之外的路径,因此它无法在这些位置上恶意执行操作(读取、写入等)。([引文][7]
> 该思路是创建一个目录树,在其中复制或链接运行该进程所需的所有系统文件。然后,你可以使用 `chroot()` 系统调用来告诉它根目录现在位于此新树的基点上,然后启动在该 chroot 环境中运行的进程。由于该命令因此而无法引用修改后的根目录之外的路径,因此它无法在这些位置上执行恶意操作(读取、写入等)。([引文][7]
18、如何保护你的系统免遭黑客攻击
**18、如何保护你的系统免遭黑客攻击**
> 遵循最低特权原则和这些做法:
>
@ -155,33 +154,33 @@
> * 定期检查你的例外情况。
> * 让具体的人对失败负责。(它使你保持警惕。)([引文][8]
19、什么是 LVM使用 LVM 有什么好处?
**19、什么是 LVM使用 LVM 有什么好处?**
> LVM逻辑卷管理使用一种存储设备管理技术,该技术使用户能够合并和抽象化组件存储设备的物理布局,从而可以更轻松、灵活地进行管理。使用设备映射器 Linux 内核框架当前迭代LVM2可用于将现有存储设备收集到组中并根据需要从组合的空间分配逻辑单元。
> LVM逻辑卷管理一种存储设备管理技术,该技术使用户能够合并和抽象化组件存储设备的物理布局,从而可以更轻松、灵活地进行管理。使用设备映射器 Linux 内核框架当前迭代LVM2可用于将现有存储设备收集到组中并根据需要从组合的空间分配逻辑单元。
20、什么是粘性端口
**20、什么是粘性端口**
> 粘性端口是网络管理员最好的朋友,也是最头痛的事情之一。它们允许你设置网络,以便通过将交换机上的每个端口锁定到特定的 MAC 地址,仅允许一台(或你指定的数字)计算机在该端口上进行连接。
21、解释一下端口转发
**21、解释一下端口转发**
> 尝试与安全的网络内部的系统进行通信时,从外部进行通信可能非常困难,这是很显然的。因此,在路由器本身或其他连接管理设备中使用端口转发表可以使特定流量自动转发到特定目的地。例如,如果你的网络上运行着一台 Web 服务器,并且想从外部授予对该服务器的访问权限,则可以将端口转发设置为该服务器上的端口 80。这意味着在网络浏览器中输入你的外网IP 地址的任何人都将立即连接到服务器的网站。
> 尝试与安全的网络内部的系统进行通信时,从外部进行通信可能非常困难,这是很显然的。因此,在路由器本身或其他连接管理设备中使用端口转发表可以使特定流量自动转发到特定目的地。例如,如果你的网络上运行着一台 Web 服务器,并且想从外部授予对该服务器的访问权限,则可以将端口转发设置为该服务器上的端口 80。这意味着在 Web 浏览器中输入你的外网IP 地址的任何人都将立即连接到服务器的网站。
>
> 请注意,通常不建议允许从你的网络外部直接访问服务器。
22、对于 IDS误报和漏报是什么
**22、对于 IDS误报和漏报是什么**
> 当入侵检测系统IDS设备为实际上没有发生的入侵生成警报时这是<ruby>误报(假阳性)<rt>false positive</rt></ruby>。如果设备未生成任何警报,而入侵实际上已发生,则为<ruby>漏报(假阴性)</rt></ruby>
23、解释一下 `:(){ :|:& };:`,如果已经登录系统,如何停止此代码?
**23、解释一下 `:(){ :|:& };:`,如果已经登录系统,如何停止此代码?**
> 这是一枚复刻炸弹。它分解如下:
>
> * `:()` 定义了函数,以 `:` 作为函数名,并且空括号表示它不接受任何参数。
> * `:()` 定义了函数,以 `:` 作为函数名,并且空括号表示它不接受任何参数。
> * `{}` 是函数定义的开始和结束。
> * `:|:` 将函数 `:` 的副本加载到内存中,并将其输出通过管道传递给函数 `:` 的另一个副本,该副本也必须加载到内存中。
> * `` 使前一个命令行成为后台进程,因此即使父进程被自动杀死,子进程也不会被杀死。
> * `:` 再次执行该函数,因此连锁反应开始。
> * `:` 执行该函数,因此连锁反应开始。
>
> 保护多用户系统的最佳方法是使用特权访问管理PAM来限制用户可以使用的进程数。
>
@ -195,7 +194,7 @@
>
> 对于复刻炸弹,最好的选择是防患于未然。
24、什么是 OOM 杀手,它如何决定首先杀死哪个进程?
**24、什么是 OOM 杀手,它如何决定首先杀死哪个进程?**
> 如果内存被进程彻底耗尽,可能会威胁到系统的稳定性,那么<ruby>内存不足<rt>out of memory</rt></ruby>OOM杀手就登场了。
>
@ -205,11 +204,11 @@
>
> `$ cat /proc/10292/oom_score`
>
> 任何进程的 `oom_score` 值越高,在内存不足的情况下被 OOM 杀手杀死的可能性就越高。 [引文][9]
> 任何进程的 `oom_score` 值越高,在内存不足的情况下被 OOM 杀手杀死的可能性就越高。([引文][9]
### 总结
系统管理人员的薪水[差别很大][10],有些网站上说年薪在 70,000 到 100,000 美元之间,具体取决于地点、组织的规模以及你的教育水平以及多年的工作经验。最后,系统管理的职业道路归结为你对使用服务器和解决那些酷问题的兴趣。现在,我要说,继续前进,实现你的梦想之路吧!
系统管理人员的薪水[差别很大][10],有些网站上说年薪在 70,000 到 100,000 美元之间,具体取决于地点、组织的规模以及你的教育水平以及多年的工作经验。系统管理的职业道路最终归结为你对使用服务器和解决那些酷问题的兴趣。现在,我要说,继续前进,实现你的梦想之路吧!
--------------------------------------------------------------------------------
@ -218,7 +217,7 @@ via: https://opensource.com/article/19/7/sysadmin-job-interview-questions
作者:[DirectedSoul][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,59 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Companies Prefer Hybrid Cloud to Escape Public Cloud Data Grabbity)
[#]: via: (https://www.linux.com/articles/companies-prefer-hybrid-cloud-to-escape-public-cloud-data-grabbity/)
[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/)
Companies Prefer Hybrid Cloud to Escape Public Cloud Data Grabbity
======
[![][1]][2]
[![][1]][2]
As the cloud native space is maturing, customers have started to discern the pros and cons of public cloud. They can see not just the facade of convenience and promised cost savings, but also the bills piling up and having to hand over critical business data to public cloud companies.
[Red Hat recently conducted a global customer survey][3] about this and results indicate that customers prefer hybrid cloud over public cloud. More than 31% respondents actually used the term hybrid cloud as their cloud strategy.
Rob Hirschfeld, founder and CEO of RackN and attendee of the recent [Gartner IT Infrastructure, Operations &amp; Cloud Strategies Conference][4], noticed a similar tone. “Discussions and data from the Gartner IO Summit support that hybrid is preferred. Theres just so much existing infrastructure that its not practical to be pure anything! Its not so much that they want hybrid but that its the reality they are facing.”
There are many reasons why customers prefer hybrid over public cloud or pure private cloud. Red Hat says it boils down to three factors: data security, cost benefits, and data integration.
“Everyone accepts that cloud is secure; however, operators are starting to question how well they can control their data in cloud. Also, some of them dont trust the cloud vendors, especially with some of the new analytics services,” said Hirschfeld.
Hybrid cloud enables customers to balance all three factors highlighted in the Red Hat survey. They can move pieces of their infrastructure between public and private cloud depending on the need. It lets them reap the benefits of public cloud without having to compromise their data.
Although 31% might seem like a small number, it doesnt mean that the remaining 69% is running their workloads on public cloud. In fact, only 12% described themselves as having either a public cloud first strategy or a strategy to standardize on a single public cloud. Red Hat says 6% described their strategy as multi-cloud based on multiple public clouds, while 21% have a private cloud first strategy.
In particular, EMEA respondents described themselves as having a private cloud strategy, not hybrid. This region is concerned about handing over their data to US-based cloud companies, given its current political landscape. A simple embargo on your country will cut your entire business out of the public cloud run by Google, AWS, and Azure. Some of the biggest use cases in this region involve companies building their own private and public cloud using OpenStack.
Perhaps the most worrisome finding is that there are still companies without any concrete cloud strategy. Around 17% of the respondents were still working on a plan, while 12% respondents didnt have any plan at all. Unfortunately, these companies are so far behind the curve that their future hangs in the balance. Hirschfeld warns that there is an urgency to cut their technical debt and embrace cloud now or they will find it hard to survive in the modern world.
In fact, Hirschfeld states that you need to have a cloud strategy even if you dont use cloud. “The reality is that cloud is the default deployment choice for everything — from demos and proof-of-concept to training — because its predictable and accessible.” Teams must adapt to the patterns, even if they are not adopting.
The Red Hat survey found that companies do recognize the importance of building up technical skills. When asked to choose their top non-IT funding priorities, respondents chose both technical skills training (16%) and a digital transformation strategy (16%).
However, new technologies and jargon are emerging at such a fast pace that its virtually impossible to find experts (or even skilled professionals) in technologies that were open-sourced at CNCF just a month ago. The hype/adoption curve is so accelerated that it has gotten silly. Therefore, porting to the latest shiny requires evaluation.
“The reality is that new projects, even Kubernetes, still need baking time for scale operations. If there are not enough people with knowledge, then its OK (really, its required) to pick your battles or slow your adoption,” said Hirschfeld.
--------------------------------------------------------------------------------
via: https://www.linux.com/articles/companies-prefer-hybrid-cloud-to-escape-public-cloud-data-grabbity/
作者:[Swapnil Bhartiya][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://www.linux.com/author/swapnil/
[b]: https://github.com/lujun9972
[1]: https://www.linux.com/wp-content/uploads/2019/12/computer-2930704_1280-1068x634.jpg (computer-2930704_1280)
[2]: https://www.linux.com/wp-content/uploads/2019/12/computer-2930704_1280.jpg
[3]: https://www.redhat.com/en/blog/red-hat-global-customer-tech-outlook-2020-hybrid-cloud-leads-strategy-aiml-leaps-forefront
[4]: https://www.gartner.com/en/conferences/na/infrastructure-operations-cloud-us

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: ( luming)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,110 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (5 cool terminal pagers in Fedora)
[#]: via: (https://fedoramagazine.org/5-cool-terminal-pagers-in-fedora/)
[#]: author: (Jacob Burns https://fedoramagazine.org/author/jaek/)
5 cool terminal pagers in Fedora
======
![][1]
Large files like logs or source code can run into the thousands of lines. That makes navigating them difficult, particularly from the terminal. Additionally, most terminal emulators have a scrollback buffer of only a few hundred lines. That can make it impossible to browse large files in the terminal using utilities which print to standard output like _cat_, _head_ and _tail_. In the early days of computing, programmers solved these problems by developing utilities for displaying text in the form of virtual “pages” — utilities imaginatively described as _pagers_.
Pagers offer a number of features which make text file navigation much simpler, including scrolling, search functions, and the ability to feature as part of a [pipeline][2] of commands. In contrast to most text editors, some terminal pagers do not require loading the entire file for viewing, which makes them faster, especially for very large files.
In the modern era of Linux computing, terminal emulators are more sophisticated than ever. They offer support for a kaleidoscope of colors, terminal resizing, as well as a host of other features to make parsing text on screen easier and more efficient. Terminal pagers have undergone a similar evolution, from extremely simple UNIX utilities like _pg_ and _more_, to sophisticated programs with a wide range of features, covering any number of use cases. With this in mind, weve put together a list of some of the most popular terminal paging utilities — more or less.
### More
_more_ is one of the earliest pagers, initially featured in version 3.0 BSD. The first implementation of _more_ was written in 1978 by [Daniel Halbert][3]. Since then, _more_ has become a ubiquitous feature of many operating systems, including Windows, OS/2, MacOS and most linux distributions.
_more_ is a very lightweight utility. The version featured in util-linux runs to just under 2100 lines of C. However, this small footprint comes at a price. Most versions of _more_ feature relatively limited functionality, with no support for backwards scroll or search. Commands are similarly stripped back: press enter to scroll one line, or space to scroll one page. Some other useful commands include:
* Press v while reading to open the current file in your default terminal editor.
* /_pattern_ lets you search for the next occurrence of _pattern_.
* :n and :p will open the next and previous files respectively when more is called with more than one file as arguments
### Less
_less_ was initially conceived as a successor to _more_, addressing some of its limitations. Building on the functionality of _more_, _less_ adds a number of useful features including backwards scroll, backwards search. It is also more amenable to window resizing.
Navigation in _less_ is similar to _more_, though _less_ borrows a few useful commands from the _vi_ editor as well. Users can navigate the document using the familiar home row navigational keys. A glance at the man page for _less_ reveals a fairly rich repertoire of available commands. Some particularly useful examples include:
* ?_pattern_ lets you search backwards in the file for _pattern_
* &amp;_pattern_ shows only lines which feature _pattern_. This is particularly useful for those who find themselves issuing **$ grep pattern | less** regularly.
* Calling less with the -s (sqeueeze-blank-lines) flag allows you to view text files with large gaps. Multiple newline characters are reduced to single breaks.
* s _filename_, called from within the program, saves input to _filename_ (if input is a pipe).
* Alternatively, calling less with the -o _filename_ flag will save the input of less to _filename._
With this enhanced functionality comes a little extra weight. The version of _less_ that ships with Fedora at the time of writing clocks in at around 25000 lines of source code. Granted, for all but the most storage constrained systems, this is a non-issue. Besides, _less_ is more than _more_.
### Most
While _less_ aims to expand on the existing capabilities of _more_, _most_ takes a different approach. Rather than expanding on the traditional single file view, _most_ gives users the ability to split their view into “windows.” Each window contains different files in different viewing modes.
Significantly, _most_ takes into account the width of its input text. The default viewing mode doesnt wrap text (-S in less), a feature particularly useful when dealing with “wide” files. While these design decisions might represent a significant departure from tradition for some users, the end result is very powerful.
In addition to the navigation commands offered by _more_, _most_ uses intuitive mnemonics for file navigation. For example, _**t**_ moves to the **t**op of a file, and _**b**_ moves to the bottom. As a result, users unfamiliar with _vi_ and its descendants will find most to be refreshingly simple.
The distinguishing feature of _most_ is its ability to split windows and contexts quickly and easily. For example, one could open two distinct text files using the following:
```
$ most textFile1.txt textFile2.txt
```
In order to split the screen horizontally, use the key combos **Ctrl+x, 2** or **Ctrl+w, 2**. The command _:n_ will open the next file argument in a given window, offering a split screen view of two files:
![][4]
If you turn wrap off in one window, it does not affect the behavior of other windows. The \ character indicates a wrap or fold, while the $ character indicates that the file extends past the limitations of the current window.
### pspg
Those who work with SQL databases often need to be able to examine the contents of our databases at a glance. The command line interfaces for many popular open source DBMSs, such as MySQL and PostGreSQL, use the system default pager to view outputs that dont fit on a single screen. Utilities like _more_ and _less_ are designed around the idea of presenting text files, but for more structured data, leave something to be desired. Naive text paginating programs have no concept of broad, tabular data, which can be frustrating when dealing with large queries.
[pspg][5] attempts to address this by offering users the ability to freeze columns while viewing, sort data _in situ_, and colourize output. While _pspg_ was intended initially to serve as a pager replacement for _psql_ specifically, the program also supports the viewing of CSV data, and is a suitable drop-in replacement for _mysql_ and _pgcli_.
### Vim
In a modern, technicolor terminal, the idea of endless pages of drab grey on black text can feel like something of an anachronism. The syntax highlighting options offered by powerful text editors like _vim_ can be useful for browsing source code. Furthermore, the search functions offered by _vim_ vastly outclass the competition. With this in mind, _vim_ ships with a shell script _less.sh_ that lets _vim_ serve as a replacement for conventional pagers.
To set _vim_ as [the default pager][6] for man pages, add the following to your shells config (such as _~/.bashrc_ if using the default bash shell):
```
export MANPAGER="/bin/sh -c \"col -b | vim -c 'set ft=man ts=8 nomod nolist nonu noma' -\""
```
Alternatively, to set _vim_ as the default pager system-wide, locate the _less.sh_ script. (You can find it at _/usr/share/vim/vim81/macros/_ on current Fedora systems.) Export this location as the variable _PAGER_ to set it as default, or under an alias to invoke it explicitly.
* * *
_Photo by [Cathy Mü][7] on [Unsplash][8]._
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/5-cool-terminal-pagers-in-fedora/
作者:[Jacob Burns][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/jaek/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2019/11/5-pagers-816x345.jpg
[2]: https://fedoramagazine.org/command-line-quick-tips-using-pipes-to-connect-tools/
[3]: https://danhalbert.org/more.html
[4]: https://fedoramagazine.org/wp-content/uploads/2019/11/image-2.png
[5]: https://github.com/okbob/pspg
[6]: https://zameermanji.com/blog/2012/12/30/using-vim-as-manpager/
[7]: https://unsplash.com/@zyljosa?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[8]: https://unsplash.com/s/photos/pages?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText

View File

@ -0,0 +1,88 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to generate code with Apache Velocity)
[#]: via: (https://opensource.com/article/19/12/generate-code-apache-velocity)
[#]: author: (Girish Managoli https://opensource.com/users/gammay)
How to generate code with Apache Velocity
======
Get started with Velocity, an open source, Java-based template engine
and code generator that converts templates into source code.
![Binary code on a computer screen][1]
Apache [Velocity][2] is an open source, Java-based template engine and code generator that converts templates into source code. Because it is implemented in Java, it is capable of interpreting varied templates and generating code for any language (web, service, SQL, scripts, etc.), although it seems to be oriented mostly toward web development.
## Velocity's structure
Velocity's structure is comprised of an engine and tools. Its core is the Velocity Engine, which uses the defined template, interprets the template language, and generates the code.
Templates are defined with Velocity Template Language ([VTL][3]), a simple language with effective directives. VTL statements are directives or variables, and variables can be standalone or class methods.
Examples of VTL expressions include:
```
`package ${packagename};`[/code] | Inserts a package statement in Java where the package name is defined as **packagename**
---|---
```
`public ${classname} implements Serializable {`[/code] | Adds a class with name **classname**
```
#foreach( $property in $properties )
 public ${property.fieldType} get${property.getField()}() {
     return this.${property.fieldName};
 }
#end [/code] | Creates getter methods for all defined properties
Velocity tools are collections of basic user-friendly capabilities. There are [GenericTools][4], a "set of classes that provide basic infrastructure for using tools in standard Java SE Velocity projects, as well as a set of tools for use in generic Velocity templates." They include DateTool, MathTool, NumberTool, SortTool, and XmlTool. There are also [VelocityView][5] tools, which include "all of the GenericTools and adds infrastructure and specialized tools for using Velocity in the view layer of web applications (Java EE projects)." VelocityView tools include BrowserTool, CookieTool, and ImportTool
## Velocity advantages and disadvantages
Velocity is easy to use and has the capability to generate any language. On the downside, there is a learning curve to understand and apply its template language. Velocity is morphology- and ontology-free. It has no knowledge of the design capability of the module it generates. As a practical example, Velocity may use a template for a controller (e.g., Model-View-Controller or an architecture style) and generate the code, but it has no awareness of the concept of a controller. This is both an advantage and disadvantage, with a generator being simple and easy to use but with no awareness of the design's aptitude.
## Using Velocity
Velocity's Java library is available on the [Maven repository][6]. To use the .jar file, define Velocity's latest version in your Maven build config. (Velocity 1.7 is the latest version, as of this writing.) For example, enter the following in your Maven Project Object Model (POM):
```
&lt;dependency&gt;
        &lt;groupId&gt;org.apache.velocity&lt;/groupId&gt;
        &lt;artifactId&gt;velocity&lt;/artifactId&gt;
        &lt;version&gt;1.7&lt;/version&gt;
&lt;/dependency&gt;
```
### Java Hello World example
To generate code, you need two things:
1. The **Velocity template** to be used for generation, e.g., java_example.vm: [code] public class ${className} {
    public static void main([String][7][] args) {
        [System][8].out.println("${message}");
    }
}
```
2. The **Velocity generator** that uses the template to generate code, e.g., VelocityStartGenerator.java: [code] public class VelocityStartGenerator {
 
    static [String][7] inputTemplate = "java_example.vm";
    static [String][7] className = "VelocityExample";
    static [String][7] message = "Hello World!";
    static [String][7] outputFile = className + ".java";
       
    public static void main([String][7][] args) throws [IOException][9] {
       
        VelocityEngine velocityEngine = new VelocityEngine();
        velocityEngine.init();
     
        VelocityContext context = new VelocityContext();
        context.put("className", className);
 

View File

@ -0,0 +1,58 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (What GNOME 2 fans love about the Mate Linux desktop)
[#]: via: (https://opensource.com/article/19/12/mate-linux-desktop)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
What GNOME 2 fans love about the Mate Linux desktop
======
This article is part of a special series of 24 days of Linux desktops.
If you remember GNOME 2 fondly, the Mate Linux desktop will fulfill your
need for nostalgia.
![Linux keys on the keyboard for a desktop computer][1]
Stop me if you've heard this one before: When GNOME 3 was first released, many GNOME users were not ready to give up GNOME 2. The [Mate][2] (named after the _yerba mate_ plant) project began as an effort to continue the GNOME 2 desktop, at first using GTK 2 (the toolkit GNOME 2 was based upon) and later incorporating GTK 3. The desktop became wildly popular, due in no small part to Linux Mint's prompt adoption of it, and since then, it has become commonly available on Fedora, Ubuntu, Slackware, Arch, and many other Linux distributions. Today, Mate continues to deliver a traditional desktop environment that looks and feels exactly like GNOME 2 did, using the GTK 3 toolkit.
You may find Mate included in the software repository of your Linux distribution, or you can download and [install][3] a distribution that ships Mate as its default desktop. Before you do, though, be aware that it is meant to provide a full desktop experience, so many Mate apps are installed along with the desktop. If you're running a different desktop, you may find yourself with redundant applications (two PDF readers, two media players, two file managers, and so on). If you just want to try the Mate desktop, you can install a Mate-based distribution in a virtual machine, such as [GNOME Boxes][4].
### Mate desktop tour
The Mate project doesn't just evoke GNOME 2; it _is_ GNOME 2. If you were a fan of the Linux desktop back in the mid-'00s, at the very least, you'll find Mate nostalgic. I was not a fan of GNOME 2 and tended to use KDE instead, but there's one place I can't imagine without GNOME 2: [OpenSolaris][5]. The OpenSolaris project didn't last long, coming to prominence when Ian Murdock joined Sun Microsystems just before it was subsumed by Oracle, but I was a low-level Solaris admin at the time and used OpenSolaris to teach myself more about that flavor of Unix. It was the only platform where I used GNOME 2 (because I didn't know how to change the desktop at first and then just got used to it), and today the [OpenIndiana project][6], a community continuation of OpenSolaris, uses GNOME 2 by way of the Mate desktop.
![Mate on OpenIndiana][7]
Mate's layout consists of three menus in the top-left corner: Applications, Places, and System. The Applications menu provides quick access to all application launchers installed on the system. The Places menu provides quick access to common locations, such as your home directory, a network folder, and so on. The System menu contains global options, such as shutdown and suspend. In the upper-right corner is a system tray, and there's a taskbar and a virtual desktop pager at the bottom of the screen.
It's a slightly peculiar configuration, as far as desktop design goes. It borrows equal parts from earlier Linux desktops, the Mac Finder, and Windows, but creates a unique configuration that's intuitive and somehow familiar. Mate intentionally resists deviation from this model, and that's exactly the way its users prefer it.
### Mate and open source
Mate is one of the most direct examples of how open source empowers developers to fight against a project's end of life. On paper, GNOME 2 was superseded by GNOME 3, yet it lives on because one developer forked the code and carried on. Momentum grew, more developers joined, and the desktop that users love is healthier than ever. Not all software gets a second chance at life, but the option is always there with open source, and it's always absent otherwise.
Using and supporting open source means supporting user and developer freedom. And the Mate desktop is a powerful example of what happens when it works.
Exploring different desktops is a good thing. Ive recently converted to GNOME 3 ("hallowed be its...
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/12/mate-linux-desktop
作者:[Seth Kenlon][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://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_keyboard_desktop.png?itok=I2nGw78_ (Linux keys on the keyboard for a desktop computer)
[2]: https://mate-desktop.org/
[3]: https://mate-desktop.org/install/
[4]: https://opensource.com/article/19/5/getting-started-gnome-boxes-virtualization
[5]: https://en.wikipedia.org/wiki/OpenSolaris
[6]: https://www.openindiana.org/documentation/faq/#what-is-openindiana
[7]: https://opensource.com/sites/default/files/uploads/advent-mate-openindiana_675px.jpg (Mate on OpenIndiana)

View File

@ -0,0 +1,121 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Why you need to know about Seeed hardware devices)
[#]: via: (https://opensource.com/article/19/12/seeeduino-nano-review)
[#]: author: (Alan Smithee https://opensource.com/users/alansmithee)
Why you need to know about Seeed hardware devices
======
Learn how Seeed microcontrollers solve the problem of building modular
projects.
![Multi-colored and directional network computer cables][1]
The microcontroller craze doesn't seem to be dying down—and that's a good thing because these products consistently succeed where the mobile market consistently fails: Users get open software _and hardware_, a portable form factor, and a wide choice of vendors and products that are built to last.
Among the best of the open hardware and software vendors is [Seeed][2], the self-proclaimed "IoT Hardware Enabler." I recently started seeing the Seeed logo on projects, so I contacted the company to learn about the interesting things they're doing. In response, they generously sent me one of their latest products: the [Seeeduino Nano][3], a compact board that the company says is fully compatible with the Arduino Nano but at half the price and a quarter the size, along with a sample sensor to get me started.
I spent a few days with it, and I'm already working on a project to improve my home garden and thinking of several others for home automation. Far from just another Arduino-like product, the Seeeduino Nano solves several problems new makers face when they get a microcontroller and want to use it.
### What do I do with this?
The most common problem I hear from people underwhelmed by the Raspberry Pi, Arduino, or similar microcontroller is that they excitedly got a board, stepped through its tutorial, and then realized they didn't know what to do with it. As computer users, we're not used to purpose-driven devices. You get a computer-like device and use it for many purposes, so it feels strange to get a computing device and build it into a project.
It can also be a little overwhelming to get a microcontroller. It's full of potential, but it's also just a microcontroller. It can be intimidating to figure out what kind of project to start when you have a device that apparently is capable of anything.
Seeed has a line of input and output peripherals (they call it Grove) that are easy to connect and provide an easy way to modularly build projects based on what kind of information you want to process. There's nothing special about the Grove modules compared to sensors or servos you can get for any other device, but Seeed makes what can sometimes seem to be an overwhelming number of choices a lot more navigable. And better yet, Seeed provides libraries for each Grove module, so you'll never buy a part for your project then find that you don't know how to make your controller recognize it.
Because Seeed sent me a temperature and humidity sensor, my potential projects, at least in the short term, became highly focused. I knew I'd be designing either a thermometer and humidity detector for my home or a moisture monitor for some of my favorite plants. Based on the other Grove modules, I've come up with several more projects, too.
### Clean connectors
What makes the Grove modules especially nice is that they're based around I2C connectors. That means you can turn this:
![Cables and pins and alligator clips][4]
into this:
![The Seeeduino Nano with a Grove module connected][5]
Of course, you can also solve that problem with any number of attachments for a Pi or Arduino or whatever product you happen to own, but the Seeed and Grove are built for one another, so if you're embarking on a new project, this is an easy way to keep things under control from the start.
### Small footprint
The Seeeduino Nano is small. It's just 18mm by 43mm (that's about 1.5" by 1"), yet it has eight analog pins, 14 digital pins, and features the ATmega328P 8-bit AVR microcontroller. If your project has space issues, this is a great option.
![Seeeduino Nano microcontroller][6]
The sensors tend to be small, too. Size varies depending on what you purchase, but they're generally designed to save space.
![The Grove temperature and humidity pro \(left\) and a US quarter \(right\)][7]
### Setup
Getting started with the Seeeduino Nano was as easy as getting started with an Arduino. That's not always the case with Arduino-like products, because some of them assume you know the components they're built from. You might get a microcontroller, download the Arduino IDE, and discover that the product you purchased isn't an option in the Board menu, leaving you to guess which Arduino board yours is equivalent to. Seeed leaves nothing to chance and provides board definitions for all of its products. You have to import them yourself since they don't ship with the Arduino IDE, but the [Seeed wiki][8] provides instructions on how to do that through the IDE's Board Manager interface.
After you've imported the board definition, you can either start with the ritual flashing of the Blink code onto your device or just code in the Arduino IDE as usual. There are instructions on the Seeed wiki for that, too.
### Code
In addition to board definitions, Seeed provides sample code for each Grove module, so you know how to send data to the module or gather data from it. I was using the Temperature and Humidity Pro sensor, which requires the [DHT library][9]. Seeed provides the library along with a DHTtester [project][10], and instructions on how to install it are on its wiki.
The only thing Seeed doesn't provide is the name of the correct input pin for the Grove module. The project's example code, written by [LadyAda][11], uses the first analog pin (A0), but, on the Seeeduino Nano, the Grove attaches to what turns out to be A5. This is difficult to tell by looking at it, because the Grove physically attaches to the I2C plug, with no indication of what pin it's connected to. However, the Seeed is open source, so you can either look at the specs for the board, or you can just do what these kinds of gadgets beg you to do: experiment!
In the end, the basic code to get information from the Grove humidity and temperature sensor is about 20 lines of code (25 if you build in sanity checks, as LadyAda's code does):
```
// public domain code by ladyada
#include "DHT.h"
#define DHTPIN A5
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
void setup() {
  Serial.begin(9600);
  dht.begin(); }
void loop() {
  float h = dht.readHumidity();
  float t = dht.readTemperature();
  Serial.print("Humidity: ");
  Serial.print(h);
  Serial.print(" %\t");
  Serial.print("Temperature: ");
  Serial.print(t);
  Serial.println(" *C"); }
```
### Open source everything
The Seeeduino is open source, from the [downloadable Eagle file][12] to the [software][13] that helps you drive it. It's a dream platform for new users who feel overwhelmed by confusing and disparate choices or for experienced makers who have moved on from a prototype and are ready to build a neatly organized and cleanly wired project. If you've got a budding inventor in your life, let Seeed help seed their projects.
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/12/seeeduino-nano-review
作者:[Alan Smithee][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://opensource.com/users/alansmithee
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/connections_wires_sysadmin_cable.png?itok=d5WqHmnJ (Multi-colored and directional network computer cables)
[2]: http://seeedstudio.com
[3]: http://wiki.seeedstudio.com/Seeeduino-Nano/
[4]: https://opensource.com/sites/default/files/uploads/rpi-mess.jpg (Cables and pins and alligator clips)
[5]: https://opensource.com/sites/default/files/uploads/seeeduino-grove.jpg (The Seeeduino Nano with a Grove module connected)
[6]: https://opensource.com/sites/default/files/uploads/seeeduino-nano-wiki_0.jpg (Seeeduino Nano microcontroller)
[7]: https://opensource.com/sites/default/files/uploads/tempandhumid.jpg (The Grove temperature and humidity pro (left) and a US quarter (right))
[8]: http://wiki.seeedstudio.com/
[9]: https://github.com/Seeed-Studio/Grove_Temperature_And_Humidity_Sensor/releases
[10]: https://project.seeedstudio.com/
[11]: https://www.adafruit.com
[12]: https://github.com/SeeedDocument/Seeeduino-Nano/raw/master/res/Seeeduino%20nano.zip
[13]: https://github.com/Seeed-Studio

View File

@ -0,0 +1,131 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Make VLC More Awesome With These Simple Tips)
[#]: via: (https://itsfoss.com/simple-vlc-tips/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Make VLC More Awesome With These Simple Tips
======
[VLC][1] is one of the [best open source video players][2], if not the best. What most people dont know about it is that it is a lot more than just a video player.
You can do a lot of complex tasks like broadcasting live videos, capturing devices etc. Just open its menu and youll see how many options it has.
Its FOSS has a detailed tutorial discussing some of the [pro VLC tricks][3] but those are way too complicated for normal users.
This is why I am writing another article to show you some of the simple tips that you can use with VLC.
### Do more with VLC with these simple tips
Lets see what can you do with VLC other than just playing a video file.
#### 1\. Watch YouTube videos with VLC
![][4]
If you do not want to watch the annoying advertisements on [YouTube][5] or simply want a distraction-free experience for watching a YouTube video, you can use VLC.
Yes, it is very easy to stream a YouTube video on VLC.
Simply launch the VLC player, head to the Media settings and click on “**Open Network Stream**” or **CTRL + N** as a shortcut to that.
![][6]
Next, you just have to paste the URL of the video that you want to watch. There are some options to tweak usually, you should not bother using them. But, if you are curious you can click on the “**Advanced options**” to explore.
You can also add subtitles to the YouTube videos this way. However, an easier way to [watch YouTube or any online video with subtitles is using Penguin subtitle player][7].
#### 2\. Convert videos to different formats
![][8]
You can [use ffmpeg to convert videos in Linux command line][9]. You can also use a graphical tool like [HandBrake to convert video formats][10].
But if you do not want a separate app to transcode videos, you can use VLC media player to get the job done.
To do that, just head on to the Media option on VLC and then click on “**Convert/Save**” or press CTRL + R as a shortcut to get there while you have VLC media player active.
Next, you will need to either import the video from your computer/disk or paste the URL of the video that you want to save/convert.
Whatever your input source is just hit the “**Convert/Save**” button after selecting the file.
Now, you will find another window that gives you the option to change the “**Profile**” from the settings. Click on it and choose a format that youd like the video to be converted to (and saved).
You can also change the storage path for the converted file by setting the destination folder at the bottom of the screen before converting it.
#### 3\. Record Audio/Video From Source
![Vlc Advanced Controls][11]
Do you want to record the audio/video youre playing on VLC Media Player?
If yes, theres an easy solution to that. Simply navigate your way through **View-&gt;click on “Advanced Controls”**.
Once you do that, you should observe new buttons (including a red record button in your VLC player).
#### 4\. Download subtitles automatically
![][12]
Yes, you can [automatically download subtitles with VLC][13]. You do not even have to look for it on a separate website. You just have to navigate your way to **View-&gt;VLSub**.
By default, it is deactivated, so when you click on the option it gets activated and lets you search/download the subtitles you wanted.
[VLC also lets you synchronize the subtitles][14] with simple keyboard shortcuts.
#### 5\. Take A Snapshot
![][15]
With VLC, you can get some screenshots/images of the video while watching it.
You just need to right-click on the player while the video is playing/paused, you will notice a bunch of options now, navigate through **Video-&gt;Take Snapshot**.
If you have an old version installed, you might observe the snapshot option right after performing a right-click.
#### Bonus Tip: Add Audio/Video Effects to a video
From the menu, go to the “**Tools**” option. Now, click on “**Effects and Filters**” or simply press **CTRL + E** from the VLC player window to open up the option.
Here, you can observe audio effects and video effects that you can add to your video. You may not be able to see all the changes in real-time, so you will have to tweak it and save it in order to see what happens.
![][16]
Ill suggest keeping a backup of the original video before you modify the video.
#### Whats your favorite VLC tip?
I shared some of my favourite VLC tips. Do you know some cool tip that you use regularly with VLC? Why not share it with us? I may add it to the list here.
--------------------------------------------------------------------------------
via: https://itsfoss.com/simple-vlc-tips/
作者:[Ankush Das][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/ankush/
[b]: https://github.com/lujun9972
[1]: https://www.videolan.org/
[2]: https://itsfoss.com/video-players-linux/
[3]: https://itsfoss.com/vlc-pro-tricks-linux/
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/12/youtube-video-stream.jpg?ssl=1
[5]: https://www.youtube.com/
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/12/youtube-video-play.jpg?ssl=1
[7]: https://itsfoss.com/penguin-subtitle-player/
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/12/vlc-video-convert.jpg?ssl=1
[9]: https://itsfoss.com/ffmpeg/
[10]: https://itsfoss.com/handbrake/
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/12/vlc-advanced-controls.png?ssl=1
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/12/vlc-subtitles-automatic.png?ssl=1
[13]: https://itsfoss.com/download-subtitles-automatically-vlc-media-player-ubuntu/
[14]: https://itsfoss.com/how-to-synchronize-subtitles-with-movie-quick-tip/
[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/12/vlc-snapshot.png?ssl=1
[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/12/vlc-effects-screenshot.jpg?ssl=1

View File

@ -0,0 +1,103 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (5 cool terminal pagers in Fedora)
[#]: via: (https://fedoramagazine.org/5-cool-terminal-pagers-in-fedora/)
[#]: author: (Jacob Burns https://fedoramagazine.org/author/jaek/)
5 最酷的终端分页器
======
![][1]
像日志或源代码这样的大文件可能会多达成千上万行,这使得在文件内导航非常困难,尤其是在终端上。此外,大多数终端仿真器的回滚缓冲区只有几百行。这可能使得无法使用打印到标准输出的实用程序(例如 `cat`、`head` 和 `tail`)在终端中浏览大型文件。在计算的早期,程序员通过开发用于以虚拟“页面”形式显示文本的实用程序来解决这些问题,该实用程序被形象地描述为<ruby>分页器<rt>pager</rt></ruby>
*分页器*提供了许多使文本文件导航更加简单的功能,包括滚动、搜索功能,以及作为命令[管道][2]的一部分而具有的功能。与大多数文本编辑器相比,某些终端分页器不需要加载整个文件即可查看,这使它们更快,特别是对于非常大的文件。
在现代 Linux 计算时代,终端仿真器比以往更加复杂。它们提供了对缤纷的色彩、终端大小调整以及许多其它功能的支持,这些功能使得辨析屏幕上的文本变得更加轻松和高效。从诸如 `pg``more` 这样极其简单的 UNIX 实用程序,到涵盖各种使用场景的、功能广泛的复杂程序,终端分页器经历了类似的演变。考虑到这一点,我们或多或少地汇总了一些最受欢迎的终端分页实用程序的列表。
### more
`more` 是最早的分页器之一,最初在 3.0 BSD 版本中出现。`more` 的第一个实现由 [Daniel Halbert][3] 编写于 1978 年。从那时起,`more` 已成为许多操作系统的普遍功能,包括 Windows、OS/2MacOS 和大多数 Linux 发行版。
`more` 是一个非常轻量级的实用程序。util-linux 软件包中提供的版本只有不到 2100 行的 C 语言。但是,这种较小的大小是有代价的。`more` 的大多数版本的功能相对有限,不支持向后滚动或搜索。命令也同样被精简:按回车键可滚动一行,或按空格键滚动一页。其他一些有用的命令包括:
* 在阅读时按 `v` 键以在默认的终端编辑器中打开当前文件。
* `/模式` 可以让你搜索下一个出现的“模式”。
* 以多个文件作为参数调用 `more` 时,`:n` 和 `:p` 将分别打开下一个和上一个文件
  
### less
`less` 最初被认为是 `more` 的继承者,解决了它的一些局限性。`less` 以 `more` 的功能为基础,增加了许多有用的功能,包括向后滚动、向后搜索。它也更适合窗口大小调整。
`less` 中的导航与 `more` 类似,尽管 `less` 也从 `vi` 编辑器借用了一些有用的命令。用户可以使用熟悉的 home 行导航键浏览文档。看一眼 `less` 的手册页,就会发现相当多的可用命令。一些特别有用的示例包括:
* `?模式` 可让你在文件中向后搜索“模式”。
* `&模式` 仅显示具有“模式”特征的行。这对于发现自己经常要使用 `$ grep 模式 | less` 的人特别有用。
* 使用 `-s``sqeueeze-blank-lines`)标志来调用 `less`,使你可以查看空白较大的文本文件。 多个换行符被简化为单个中断。
* 在程序中调用的 `s 文件名` 将输入保存到 `文件名`中(如果输入来自管道)。
* 或者,使用 `-o 文件名` 标志来调用 `less` 将把 `less` 的输入保存到 `文件名` 中。
  
随着这些增强的功能也带来了体积的略微增大。在写作本文时Fedora 随附的 `less` 版本大约有 25000 行源代码。当然,除非是受存储限制最大的系统,其它的所有系统上这都不是问题。此外,`less` 比 `more` 功能更多。
### most
`less` 旨在扩展 `more` 的现有功能,而 `most` 采用另一种方法。`most` 不是在传统的单个文件视图上进行扩展,而是使用户能够将其视图拆分为“窗口”。每个窗口以不同的查看模式包含不同的文件。
重要的是,`most` 考虑了其输入文本的宽度。默认的查看模式是不换行的(`less` 中的 `-S` 参数),此功能在处理“宽”文件时特别有用。尽管对于某些用户来说,这些设计决策可能代表着与传统的重大偏离,但最终结果却非常强大。
除了 `more` 提供的导航命令外,`most` 使用直观的助记符进行文件导航。例如,`t` 移至文件的顶部Top`b` 移至底部Bottom。这样不熟悉 `vi` 及其后代的用户会发现 `most` 非常简单好用。
`most` 的与众不同之处在于它能够快速轻松地拆分窗口和上下文。例如,可以使用以下命令打开两个不同的文本文件:
```
$ most textFile1.txt textFile2.txt
```
为了水平拆分屏幕,请使用组合键 `Ctrl+x, 2``Ctrl+w, 2``:n` 命令将在给定窗口中打开下一个文件参数,提供两个文件的分屏视图:
![][4]
如果在一个窗口中关闭自动换行,它不会影响其他窗口的行为。`\` 字符表示换行或折叠,而 `$` 字符表示文件超出了当前窗口的限制。
### pspg
使用 SQL 数据库的人员通常需要能够一目了然地检查我们数据库的内容。许多流行的开源 DBMS例如 MySQL 和 PostGreSQL的命令行界面都使用系统默认的分页器来查看无法显示在单个屏幕上的输出。诸如`more` 和 `less` 之类的实用程序是围绕呈现文本文件的想法而设计的,但是对于更结构化的数据,还有一些不足之处。天真的文本分页程序没有宽的表格数据的概念,当处理大型查询时,这可能会令人感到沮丧。
[pspg][5] 试图通过为用户提供在查看时冻结列、*原位*排序数据并为输出着色的功能来解决此问题。尽管`pspg` 最初是专门用作 `psql` 的分页器的替代品,但该程序还支持查看 CSV 数据,并且是 `mysql``pgcli` 的合适的直接替代品。
### Vim
在现代的颜色鲜明的终端中,无休止的黑色页面上的黑色文字感觉太过时了。强大的文本编辑器(如`vim` )提供的语法高亮显示选项对于浏览源代码很有用。此外,`vim` 提供的搜索功能远远超过了竞争对手。考虑到这一点,`vim` 附带了一个 shell 脚本 `less.sh`,该脚本可以使 `vim` 替代传统的分页器。
要将 `vim` 设置为手册页的[默认分页器][6],请将以下内容添加到 shell 的配置中如果使用默认的bash shell 的话是 `~/.bashrc`
```
export MANPAGER="/bin/sh -c \"col -b | vim -c 'set ft=man ts=8 nomod nolist nonu noma' -\""
```
或者,要将 `vim` 设置为系统范围内的默认分页器,请找到 `less.sh` 脚本。(你可以在当前 Fedora 系统上的 `/usr/share/vim/vim81/macros/` 找到它。)将此位置导出为变量 `PAGER` 以将其设置为默认值,或者将其设置为别名以显式调用它。
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/5-cool-terminal-pagers-in-fedora/
作者:[Jacob Burns][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://fedoramagazine.org/author/jaek/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2019/11/5-pagers-816x345.jpg
[2]: https://fedoramagazine.org/command-line-quick-tips-using-pipes-to-connect-tools/
[3]: https://danhalbert.org/more.html
[4]: https://fedoramagazine.org/wp-content/uploads/2019/11/image-2.png
[5]: https://github.com/okbob/pspg
[6]: https://zameermanji.com/blog/2012/12/30/using-vim-as-manpager/
[7]: https://unsplash.com/@zyljosa?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[8]: https://unsplash.com/s/photos/pages?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText