mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-13 22:30:37 +08:00
Merge remote-tracking branch 'LCTT/master' into 20190404-How-writers-can-get-work-done-better-with-Git
This commit is contained in:
commit
698663fa68
134
published/20190301 Guide to Install VMware Tools on Linux.md
Normal file
134
published/20190301 Guide to Install VMware Tools on Linux.md
Normal file
@ -0,0 +1,134 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (tomjlw)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11467-1.html)
|
||||
[#]: subject: (Guide to Install VMware Tools on Linux)
|
||||
[#]: via: (https://itsfoss.com/install-vmware-tools-linux)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
在 Linux 上安装 VMware 工具
|
||||
======
|
||||
|
||||
> VMware 工具通过允许你共享剪贴板和文件夹以及其他东西来提升你的虚拟机体验。了解如何在 Ubuntu 和其它 Linux 发行版上安装 VMware 工具。
|
||||
|
||||
![如何在 Linux 上安装 VMware 工具][4]
|
||||
|
||||
在先前的教程中,你学习了[在 Ubuntu 上安装 VMware 工作站][1]。你还可以通过安装 VMware 工具进一步提升你的虚拟机功能。
|
||||
|
||||
如果你已经在 VMware 上安装了一个访客机系统,你必须要注意 [VMware 工具][2]的要求 —— 尽管并不完全清楚到底有什么要求。
|
||||
|
||||
在本文中,我们将要强调 VMware 工具的重要性、所提供的特性,以及在 Ubuntu 和其它 Linux 发行版上安装 VMware 工具的方法。
|
||||
|
||||
### VMware 工具:概览及特性
|
||||
|
||||
![在 Ubuntu 上安装 VMware 工具][3]
|
||||
|
||||
出于显而易见的理由,虚拟机(你的访客机系统)并不能做到与宿主机上的表现完全一致。在其性能和操作上会有特定的限制。那就是为什么引入 VMware 工具的原因。
|
||||
|
||||
VMware 工具以一种高效的形式在提升了其性能的同时,也可以帮助管理访客机系统。
|
||||
|
||||
#### VMware 工具到底负责什么?
|
||||
|
||||
你大致知道它可以做什么,但让我们探讨一下细节:
|
||||
|
||||
* 同步访客机系统与宿主机系统间的时间以简化操作
|
||||
* 提供从宿主机系统向访客机系统传递消息的能力。比如说,你可以复制文字到剪贴板,并将它轻松粘贴到你的访客机系统
|
||||
* 在访客机系统上启用声音
|
||||
* 提升访客机视频分辨率
|
||||
* 修正错误的网络速度数据
|
||||
* 减少不合适的色深
|
||||
|
||||
在访客机系统上安装了 VMware 工具会给它带来显著改变,但是它到底包含了什么特性才解锁或提升这些功能的呢?让我们来看看……
|
||||
|
||||
#### VMware 工具:核心特性细节
|
||||
|
||||
![用 VMware 工具在宿主机系统与访客机系统间共享剪切板][5]
|
||||
|
||||
如果你不想知道它包含什么来启用这些功能的话,你可以跳过这部分。但是为了好奇的读者,让我们简短地讨论它一下:
|
||||
|
||||
**VMware 设备驱动:** 它具体取决于操作系统。大多数主流操作系统都默认包含了设备驱动,因此你不必另外安装它。这主要涉及到内存控制驱动、鼠标驱动、音频驱动、网卡驱动、VGA 驱动以及其它。
|
||||
|
||||
**VMware 用户进程:** 这是这里真正有意思的地方。通过它你获得了在访客机和宿主机间复制粘贴和拖拽的能力。基本上,你可以从宿主机复制粘贴文本到虚拟机,反之亦然。
|
||||
|
||||
你同样也可以拖拽文件。此外,在你未安装 SVGA 驱动时它会启用鼠标指针的释放/锁定。
|
||||
|
||||
**VMware 工具生命周期管理:** 嗯,我们会在下面看看如何安装 VMware 工具,但是这个特性帮你在虚拟机中轻松安装/升级 VMware 工具。
|
||||
|
||||
**共享文件夹**:除了这些。VMware 工具同样允许你在访客机与宿主机系统间共享文件夹。
|
||||
|
||||
![使用 VMware 工具在访客机与宿机系统间共享文件][6]
|
||||
|
||||
当然,它的效果同样取决于访客机系统。例如在 Windows 上你通过 Unity 模式运行虚拟机上的程序并从宿主机系统上操作它。
|
||||
|
||||
### 如何在 Ubuntu 和其它 Linux 发行版上安装 VMware 工具
|
||||
|
||||
**注意:** 对于 Linux 操作系统,你应该已经安装好了“Open VM 工具”,大多数情况下免除了额外安装 VMware 工具的需要。
|
||||
|
||||
大部分时候,当你安装了访客机系统时,如果操作系统支持 [Easy Install][7] 的话你会收到软件更新或弹窗告诉你要安装 VMware 工具。
|
||||
|
||||
Windows 和 Ubuntu 都支持 Easy Install。因此如果你使用 Windows 作为你的宿主机或尝试在 Ubuntu 上安装 VMware 工具,你应该会看到一个和弹窗消息差不多的选项来轻松安装 VMware 工具。这是它应该看起来的样子:
|
||||
|
||||
![安装 VMware 工具的弹窗][8]
|
||||
|
||||
这是搞定它最简便的办法。因此当你配置虚拟机时确保你有一个通畅的网络连接。
|
||||
|
||||
如果你没收到任何弹窗或者选项来轻松安装 VMware 工具。你需要手动安装它。以下是如何去做:
|
||||
|
||||
1. 运行 VMware Workstation Player。
|
||||
2. 从菜单导航至 “Virtual Machine -> Install VMware tools”。如果你已经安装了它并想修复安装,你会看到 “Re-install VMware tools” 这一选项出现。
|
||||
3. 一旦你点击了,你就会看到一个虚拟 CD/DVD 挂载在访客机系统上。
|
||||
4. 打开该 CD/DVD,并复制粘贴那个 tar.gz 文件到任何你选择的区域并解压,这里我们选择“桌面”作为解压目的地。
|
||||
|
||||
![][9]
|
||||
5. 在解压后,运行终端并通过输入以下命令导航至里面的文件夹:
|
||||
|
||||
```
|
||||
cd Desktop/VMwareTools-10.3.2-9925305/vmware-tools-distrib
|
||||
```
|
||||
|
||||
你需要检查文件夹与路径名,这取决于版本与解压目的地,名字可能会改变。
|
||||
|
||||
![][10]
|
||||
|
||||
用你的存储位置(如“下载”)替换“桌面”,如果你安装的也是 10.3.2 版本,其它的保持一样即可。
|
||||
6. 现在仅需输入以下命令开始安装:
|
||||
|
||||
```
|
||||
sudo ./vmware-install.pl -d
|
||||
```
|
||||
|
||||
![][11]
|
||||
|
||||
你会被询问密码以获得安装权限,输入密码然后应当一切都搞定了。
|
||||
|
||||
到此为止了,你搞定了。这系列步骤应当适用于几乎大部分基于 Ubuntu 的访客机系统。如果你想要在 Ubuntu 服务器上或其它系统安装 VMware 工具,步骤应该类似。
|
||||
|
||||
### 总结
|
||||
|
||||
在 Ubuntu Linux 上安装 VMware 工具应该挺简单。除了简单办法,我们也详述了手动安装的方法。如果你仍需帮助或者对安装有任何建议,在评论区评论让我们知道。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/install-vmware-tools-linux
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[tomjlw](https://github.com/tomjlw)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/install-vmware-player-ubuntu-1310/
|
||||
[2]: https://kb.vmware.com/s/article/340
|
||||
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools-downloading.jpg?fit=800%2C531&ssl=1
|
||||
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/install-vmware-tools-linux.png?resize=800%2C450&ssl=1
|
||||
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools-features.gif?resize=800%2C500&ssl=1
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools-shared-folder.jpg?fit=800%2C660&ssl=1
|
||||
[7]: https://docs.vmware.com/en/VMware-Workstation-Player-for-Linux/15.0/com.vmware.player.linux.using.doc/GUID-3F6B9D0E-6CFC-4627-B80B-9A68A5960F60.html
|
||||
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools.jpg?fit=800%2C481&ssl=1
|
||||
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools-extraction.jpg?fit=800%2C564&ssl=1
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools-folder.jpg?fit=800%2C487&ssl=1
|
||||
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools-installation-ubuntu.jpg?fit=800%2C492&ssl=1
|
@ -0,0 +1,73 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11461-1.html)
|
||||
[#]: subject: (Blockchain 2.0 – Introduction To Hyperledger Fabric [Part 10])
|
||||
[#]: via: (https://www.ostechnix.com/blockchain-2-0-introduction-to-hyperledger-fabric/)
|
||||
[#]: author: (sk https://www.ostechnix.com/author/sk/)
|
||||
|
||||
区块链 2.0:Hyperledger Fabric 介绍(十)
|
||||
======
|
||||
|
||||
![Hyperledger Fabric][1]
|
||||
|
||||
### Hyperledger Fabric
|
||||
|
||||
[Hyperledger 项目][2] 是一个伞形组织,包括许多正在开发的不同模块和系统。在这些子项目中,最受欢迎的是 “Hyperledger Fabric”。这篇博文将探讨一旦区块链系统开始大量使用到主流,将使 Fabric 在不久的将来成为几乎不可或缺的功能。最后,我们还将快速了解开发人员和爱好者们需要了解的有关 Hyperledger Fabric 技术的知识。
|
||||
|
||||
### 起源
|
||||
|
||||
按照 Hyperledger 项目的常规方式,Fabric 由其核心成员之一 IBM “捐赠”给该组织,而 IBM 以前是该组织的主要开发者。由 IBM 共享的这个技术平台在 Hyperledger 项目中进行了联合开发,来自 100 多个成员公司和机构为之做出了贡献。
|
||||
|
||||
目前,Fabric 正处于 LTS 版本的 v1.4,该版本已经发展很长一段时间,并且被视为企业管理业务数据的解决方案。Hyperledger 项目的核心愿景也必然会渗透到 Fabric 中。Hyperledger Fabric 系统继承了所有企业级的可扩展功能,这些功能已深深地刻入到 Hyperledger 组织旗下所有的项目当中。
|
||||
|
||||
### Hyperledger Fabric 的亮点
|
||||
|
||||
Hyperledger Fabric 提供了多种功能和标准,这些功能和标准围绕着支持快速开发和模块化体系结构的使命而构建。此外,与竞争对手(主要是瑞波和[以太坊][3])相比,Fabric 明确用于封闭和[许可区块链][4]。它们的核心目标是开发一套工具,这些工具将帮助区块链开发人员创建定制的解决方案,而不是创建独立的生态系统或产品。
|
||||
|
||||
Hyperledger Fabric 的一些亮点如下:
|
||||
|
||||
#### 许可区块链系统
|
||||
|
||||
这是一个 Hyperledger Fabric 与其他平台(如以太坊和瑞波)差异很大的地方。默认情况下,Fabric 是一种旨在实现私有许可的区块链的工具。此类区块链不能被所有人访问,并且其中致力于达成共识或验证交易的节点将由中央机构进行选择。这对于某些应用(例如银行和保险)可能很重要,在这些应用中,交易必须由中央机构而不是参与者来验证。
|
||||
|
||||
#### 机密和受控的信息流
|
||||
|
||||
Fabric 内置了权限系统,该权限系统将视情况限制特定组或某些个人中的信息流。与公有区块链不同,在公有区块链中,任何运行节点的人都可以对存储在区块链中的数据进行复制和选择性访问,而 Fabric 系统的管理员可以选择谁能访问共享的信息,以及访问的方式。与现有竞争产品相比,它还有以更好的安全性标准对存储的数据进行加密的子系统。
|
||||
|
||||
#### 即插即用架构
|
||||
|
||||
Hyperledger Fabric 具有即插即用类型的体系结构。可以选择实施系统的各个组件,而开发人员看不到用处的系统组件可能会被废弃。Fabric 采取高度模块化和可定制的方式进行开发,而不是一种与其竞争对手采用的“一种方法适应所有需求”的方式。对于希望快速构建精益系统的公司和公司而言,这尤其有吸引力。这与 Fabric 和其它 Hyperledger 组件的互操作性相结合,意味着开发人员和设计人员现在可以使用各种标准化工具,而不必从其他来源提取代码并随后进行集成。它还提供了一种相当可靠的方式来构建健壮的模块化系统。
|
||||
|
||||
#### 智能合约和链码
|
||||
|
||||
运行在区块链上的分布式应用程序称为[智能合约][5]。虽然智能合约这个术语或多或少与以太坊平台相关联,但<ruby>链码<rt>chaincode</rt></ruby>是 Hyperledger 阵营中为其赋予的名称。链码应用程序除了拥有 DApp 中有的所有优点之外,使 Hyperledger 与众不同的是,该应用程序的代码可以用多种高级编程语言编写。它本身支持 [Go][6] 和 JavaScript,并且在与适当的编译器模块集成后还支持许多其它编程语言。尽管这一事实在此时可能并不代表什么,但这意味着,如果可以将现有人才用于正在进行的涉及区块链的项目,从长远来看,这有可能为公司节省数十亿美元的人员培训和管理费用。开发人员可以使用自己喜欢的语言进行编码,从而在 Hyperledger Fabric 上开始构建应用程序,而无需学习或培训平台特定的语言和语法。这提供了 Hyperledger Fabric 当前竞争对手无法提供的灵活性。
|
||||
|
||||
### 总结
|
||||
|
||||
* Hyperledger Fabric 是一个后端驱动程序平台,是一个主要针对需要区块链或其它分布式账本技术的集成项目。因此,除了次要的脚本功能外,它不提供任何面向用户的服务。(认可以为它更像是一种脚本语言。)
|
||||
* Hyperledger Fabric 支持针对特定用例构建侧链。如果开发人员希望将一组用户或参与者隔离到应用程序的特定部分或功能,则可以通过侧链来实现。侧链是衍生自主要父代的区块链,但在其初始块之后形成不同的链。产生新链的块将不受新链进一步变化的影响,即使将新信息添加到原始链中,新链也将保持不变。此功能将有助于扩展正在开发的平台,并引入用户特定的和案例特定的处理功能。
|
||||
* 前面的功能还意味着并非所有用户都会像通常对公有链所期望的那样拥有区块链中所有数据的“精确”副本。参与节点将具有仅与之相关的数据副本。例如,假设有一个类似于印度的 PayTM 的应用程序,该应用程序具有钱包功能以及电子商务功能。但是,并非所有的钱包用户都使用 PayTM 在线购物。在这种情况下,只有活跃的购物者将在 PayTM 电子商务网站上拥有相应的交易链,而钱包用户将仅拥有存储钱包交易的链的副本。这种灵活的数据存储和检索体系结构在扩展时非常重要,因为大量的单链区块链已经显示出会增加处理交易的前置时间。这样可以保持链的精简和分类。
|
||||
|
||||
我们将在以后的文章中详细介绍 Hyperledger Project 下的其他模块。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/blockchain-2-0-introduction-to-hyperledger-fabric/
|
||||
|
||||
作者:[sk][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://www.ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.ostechnix.com/wp-content/uploads/2019/05/Hyperledger-Fabric-720x340.png
|
||||
[2]: https://www.ostechnix.com/blockchain-2-0-an-introduction-to-hyperledger-project-hlp/
|
||||
[3]: https://www.ostechnix.com/blockchain-2-0-what-is-ethereum/
|
||||
[4]: https://www.ostechnix.com/blockchain-2-0-public-vs-private-blockchain-comparison/
|
||||
[5]: https://www.ostechnix.com/blockchain-2-0-explaining-smart-contracts-and-its-types/
|
||||
[6]: https://www.ostechnix.com/install-go-language-linux/
|
273
published/20190809 Mutation testing is the evolution of TDD.md
Normal file
273
published/20190809 Mutation testing is the evolution of TDD.md
Normal file
@ -0,0 +1,273 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (Morisun029)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11468-1.html)
|
||||
[#]: subject: (Mutation testing is the evolution of TDD)
|
||||
[#]: via: (https://opensource.com/article/19/8/mutation-testing-evolution-tdd)
|
||||
[#]: author: (Alex Bunardzic https://opensource.com/users/alex-bunardzic)
|
||||
|
||||
变异测试是测试驱动开发(TDD)的演变
|
||||
======
|
||||
|
||||
> 测试驱动开发技术是根据大自然的运作规律创建的,变异测试自然成为 DevOps 演变的下一步。
|
||||
|
||||
![Ants and a leaf making the word "open"][1]
|
||||
|
||||
在 “[故障是无懈可击的开发运维中的一个特点][2]”,我讨论了故障在通过征求反馈来交付优质产品的过程中所起到的重要作用。敏捷 DevOps 团队就是用故障来指导他们并推动开发进程的。<ruby>[测试驱动开发][3]<rt>Test-driven development</rt></ruby>(TDD)是任何敏捷 DevOps 团队评估产品交付的[必要条件][4]。以故障为中心的 TDD 方法仅在与可量化的测试配合使用时才有效。
|
||||
|
||||
TDD 方法仿照大自然是如何运作的以及自然界在进化博弈中是如何产生赢家和输家为模型而建立的。
|
||||
|
||||
### 自然选择
|
||||
|
||||
![查尔斯·达尔文][5]
|
||||
|
||||
1859 年,<ruby>[查尔斯·达尔文][6]<rt>Charles Darwin</rt></ruby>在他的《<ruby>[物种起源][7]<rt>On the Origin of Species</rt></ruby>》一书中提出了进化论学说。达尔文的论点是,自然变异是由生物个体的自发突变和环境压力共同造成的。环境压力淘汰了适应性较差的生物体,而有利于其他适应性强的生物的发展。每个生物体的染色体都会发生变异,而这些自发的变异会携带给下一代(后代)。然后在自然选择下测试新出现的变异性 —— 当下存在的环境压力是由变异性的环境条件所导致的。
|
||||
|
||||
这张简图说明了调整适应环境条件的过程。
|
||||
|
||||
![环境压力对鱼类的影响][8]
|
||||
|
||||
*图1. 不同的环境压力导致自然选择下的不同结果。图片截图来源于[理查德·道金斯的一个视频][9]。*
|
||||
|
||||
该图显示了一群生活在自己栖息地的鱼。栖息地各不相同(海底或河床底部的砾石颜色有深有浅),每条鱼长的也各不相同(鱼身图案和颜色也有深有浅)。
|
||||
|
||||
这张图还显示了两种情况(即环境压力的两种变化):
|
||||
|
||||
1. 捕食者在场
|
||||
2. 捕食者不在场
|
||||
|
||||
在第一种情况下,在砾石颜色衬托下容易凸显出来的鱼被捕食者捕获的风险更高。当砾石颜色较深时,浅色鱼的数量会更少一些。反之亦然,当砾石颜色较浅时,深色鱼的数量会更少。
|
||||
|
||||
在第二种情况下,鱼完全放松下来进行交配。在没有捕食者和没有交配仪式的情况下,可以预料到相反的结果:在砾石背景下显眼的鱼会有更大的机会被选来交配并将其特性传递给后代。
|
||||
|
||||
### 选择标准
|
||||
|
||||
变异性在进行选择时,绝不是任意的、反复无常的、异想天开的或随机的。选择过程中的决定性因素通常是可以度量的。该决定性因素通常称为测试或目标。
|
||||
|
||||
一个简单的数学例子可以说明这一决策过程。(在该示例中,这种选择不是由自然选择决定的,而是由人为选择决定。)假设有人要求你构建一个小函数,该函数将接受一个正数,然后计算该数的平方根。你将怎么做?
|
||||
|
||||
敏捷 DevOps 团队的方法是快速验证失败。谦虚一点,先承认自己并不真的知道如何开发该函数。这时,你所知道的就是如何描述你想做的事情。从技术上讲,你已准备好进行单元测试。
|
||||
|
||||
“<ruby>单元测试<rt>unit test</rt></ruby>”描述了你的具体期望结果是什么。它可以简单地表述为“给定数字 16,我希望平方根函数返回数字 4”。你可能知道 16 的平方根是 4。但是,你不知道一些较大数字(例如 533)的平方根。
|
||||
|
||||
但至少,你已经制定了选择标准,即你的测试或你的期望值。
|
||||
|
||||
### 进行故障测试
|
||||
|
||||
[.NET Core][10] 平台可以演示该测试。.NET 通常使用 xUnit.net 作为单元测试框架。(要跟随进行这个代码示例,请安装 .NET Core 和 xUnit.net。)
|
||||
|
||||
打开命令行并创建一个文件夹,在该文件夹实现平方根解决方案。例如,输入:
|
||||
|
||||
```
|
||||
mkdir square_root
|
||||
```
|
||||
|
||||
再输入:
|
||||
|
||||
```
|
||||
cd square_root
|
||||
```
|
||||
|
||||
为单元测试创建一个单独的文件夹:
|
||||
|
||||
```
|
||||
mkdir unit_tests
|
||||
```
|
||||
|
||||
进入 `unit_tests` 文件夹下(`cd unit_tests`),初始化 xUnit 框架:
|
||||
|
||||
```
|
||||
dotnet new xunit
|
||||
```
|
||||
|
||||
现在,转到 `square_root` 下, 创建 `app` 文件夹:
|
||||
|
||||
```
|
||||
mkdir app
|
||||
cd app
|
||||
```
|
||||
|
||||
如果有必要的话,为你的代码创建一个脚手架:
|
||||
|
||||
```
|
||||
dotnet new classlib
|
||||
```
|
||||
|
||||
现在打开你最喜欢的编辑器开始编码!
|
||||
|
||||
在你的代码编辑器中,导航到 `unit_tests` 文件夹,打开 `UnitTest1.cs`。
|
||||
|
||||
将 `UnitTest1.cs` 中自动生成的代码替换为:
|
||||
|
||||
```
|
||||
using System;
|
||||
using Xunit;
|
||||
using app;
|
||||
|
||||
namespace unit_tests{
|
||||
|
||||
public class UnitTest1{
|
||||
Calculator calculator = new Calculator();
|
||||
|
||||
[Fact]
|
||||
public void GivenPositiveNumberCalculateSquareRoot(){
|
||||
var expected = 4;
|
||||
var actual = calculator.CalculateSquareRoot(16);
|
||||
Assert.Equal(expected, actual);
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
该单元测试描述了变量的**期望值**应该为 4。下一行描述了**实际值**。建议通过将输入值发送到称为`calculator` 的组件来计算**实际值**。对该组件的描述是通过接收数值来处理`CalculateSquareRoot` 信息。该组件尚未开发。但这并不重要,我们在此只是描述期望值。
|
||||
|
||||
最后,描述了触发消息发送时发生的情况。此时,判断**期望值**是否等于**实际值**。如果是,则测试通过,目标达成。如果**期望值**不等于**实际值**,则测试失败。
|
||||
|
||||
接下来,要实现称为 `calculator` 的组件,在 `app` 文件夹中创建一个新文件,并将其命名为`Calculator.cs`。要实现计算平方根的函数,请在此新文件中添加以下代码:
|
||||
|
||||
```
|
||||
namespace app {
|
||||
public class Calculator {
|
||||
public double CalculateSquareRoot(double number) {
|
||||
double bestGuess = number;
|
||||
return bestGuess;
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
在测试之前,你需要通知单元测试如何找到该新组件(`Calculator`)。导航至 `unit_tests` 文件夹,打开 `unit_tests.csproj` 文件。在 `<ItemGroup>` 代码块中添加以下代码:
|
||||
|
||||
```
|
||||
<ProjectReference Include="../app/app.csproj" />
|
||||
```
|
||||
|
||||
保存 `unit_test.csproj` 文件。现在,你可以运行第一个测试了。
|
||||
|
||||
切换到命令行,进入 `unit_tests` 文件夹。运行以下命令:
|
||||
|
||||
```
|
||||
dotnet test
|
||||
```
|
||||
|
||||
运行单元测试,会输出以下内容:
|
||||
|
||||
![单元测试失败后xUnit的输出结果][12]
|
||||
|
||||
*图2. 单元测试失败后 xUnit 的输出结果*
|
||||
|
||||
正如你所看到的,单元测试失败了。期望将数字 16 发送到 `calculator` 组件后会输出数字 4,但是输出(`Actual`)的是 16。
|
||||
|
||||
恭喜你!创建了第一个故障。单元测试为你提供了强有力的反馈机制,敦促你修复故障。
|
||||
|
||||
### 修复故障
|
||||
|
||||
要修复故障,你必须要改进 `bestGuess`。当下,`bestGuess` 仅获取函数接收的数字并返回。这不够好。
|
||||
|
||||
但是,如何找到一种计算平方根值的方法呢? 我有一个主意 —— 看一下大自然母亲是如何解决问题的。
|
||||
|
||||
### 效仿大自然的迭代
|
||||
|
||||
在第一次(也是唯一的)尝试中要得出正确值是非常难的(几乎不可能)。你必须允许自己进行多次尝试猜测,以增加解决问题的机会。允许多次尝试的一种方法是进行迭代。
|
||||
|
||||
要迭代,就要将 `bestGuess` 值存储在 `previousGuess` 变量中,转换 `bestGuess` 的值,然后比较两个值之间的差。如果差为 0,则说明问题已解决。否则,继续迭代。
|
||||
|
||||
这是生成任何正数的平方根的函数体:
|
||||
|
||||
```
|
||||
double bestGuess = number;
|
||||
double previousGuess;
|
||||
|
||||
do {
|
||||
previousGuess = bestGuess;
|
||||
bestGuess = (previousGuess + (number/previousGuess))/2;
|
||||
} while((bestGuess - previousGuess) != 0);
|
||||
|
||||
return bestGuess;
|
||||
```
|
||||
|
||||
该循环(迭代)将 `bestGuess` 值集中到设想的解决方案。现在,你精心设计的单元测试通过了!
|
||||
|
||||
![单元测试通过了][13]
|
||||
|
||||
*图 3. 单元测试通过了。*
|
||||
|
||||
### 迭代解决了问题
|
||||
|
||||
正如大自然母亲解决问题的方法,在本练习中,迭代解决了问题。增量方法与逐步改进相结合是获得满意解决方案的有效方法。该示例中的决定性因素是具有可衡量的目标和测试。一旦有了这些,就可以继续迭代直到达到目标。
|
||||
|
||||
### 关键点!
|
||||
|
||||
好的,这是一个有趣的试验,但是更有趣的发现来自于使用这种新创建的解决方案。到目前为止,`bestGuess` 从开始一直把函数接收到的数字作为输入参数。如果更改 `bestGuess` 的初始值会怎样?
|
||||
|
||||
为了测试这一点,你可以测试几种情况。 首先,在迭代多次尝试计算 25 的平方根时,要逐步细化观察结果:
|
||||
|
||||
![25 平方根的迭代编码][14]
|
||||
|
||||
*图 4. 通过迭代来计算 25 的平方根。*
|
||||
|
||||
以 25 作为 `bestGuess` 的初始值,该函数需要八次迭代才能计算出 25 的平方根。但是,如果在设计 `bestGuess` 初始值上犯下荒谬的错误,那将怎么办? 尝试第二次,那 100 万可能是 25 的平方根吗? 在这种明显错误的情况下会发生什么?你写的函数是否能够处理这种低级错误。
|
||||
|
||||
直接来吧。回到测试中来,这次以一百万开始:
|
||||
|
||||
![逐步求精法][15]
|
||||
|
||||
*图 5. 在计算 25 的平方根时,运用逐步求精法,以 100 万作为 bestGuess 的初始值。*
|
||||
|
||||
哇! 以一个荒谬的数字开始,迭代次数仅增加了两倍(从八次迭代到 23 次)。增长幅度没有你直觉中预期的那么大。
|
||||
|
||||
### 故事的寓意
|
||||
|
||||
啊哈! 当你意识到,迭代不仅能够保证解决问题,而且与你的解决方案的初始猜测值是好是坏也没有关系。 不论你最初理解得多么不正确,迭代过程以及可衡量的测试/目标,都可以使你走上正确的道路并得到解决方案。
|
||||
|
||||
图 4 和 5 显示了陡峭而戏剧性的燃尽图。一个非常错误的开始,迭代很快就产生了一个绝对正确的解决方案。
|
||||
|
||||
简而言之,这种神奇的方法就是敏捷 DevOps 的本质。
|
||||
|
||||
### 回到一些更深层次的观察
|
||||
|
||||
敏捷 DevOps 的实践源于人们对所生活的世界的认知。我们生活的世界存在不确定性、不完整性以及充满太多的困惑。从科学/哲学的角度来看,这些特征得到了<ruby>[海森堡的不确定性原理][16]<rt>Heisenberg's Uncertainty Principle</rt></ruby>(涵盖不确定性部分),<ruby>[维特根斯坦的逻辑论哲学][17]<rt>Wittgenstein's Tractatus Logico-Philosophicus</rt></ruby>(歧义性部分),<ruby>[哥德尔的不完全性定理][18]<rt>Gödel's incompleteness theorems</rt></ruby>(不完全性方面)以及<ruby>[热力学第二定律][19]<rt>Second Law of Thermodynamics</rt></ruby>(无情的熵引起的混乱)的充分证明和支持。
|
||||
|
||||
简而言之,无论你多么努力,在尝试解决任何问题时都无法获得完整的信息。因此,放下傲慢的姿态,采取更为谦虚的方法来解决问题对我们会更有帮助。谦卑会给为你带来巨大的回报,这个回报不仅是你期望的一个解决方案,还会有它的副产品。
|
||||
|
||||
### 总结
|
||||
|
||||
大自然在不停地运作,这是一个持续不断的过程。大自然没有总体规划。一切都是对先前发生的事情的回应。 反馈循环是非常紧密的,明显的进步/倒退都是逐步实现的。大自然中随处可见,任何事物的都在以一种或多种形式逐步完善。
|
||||
|
||||
敏捷 DevOps 是工程模型逐渐成熟的一个非常有趣的结果。DevOps 基于这样的认识,即你所拥有的信息总是不完整的,因此你最好谨慎进行。获得可衡量的测试(例如,假设、可测量的期望结果),进行简单的尝试,大多数情况下可能失败,然后收集反馈,修复故障并继续测试。除了同意每个步骤都必须要有可衡量的假设/测试之外,没有其他方法。
|
||||
|
||||
在本系列的下一篇文章中,我将仔细研究变异测试是如何提供及时反馈来推动实现结果的。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/8/mutation-testing-evolution-tdd
|
||||
|
||||
作者:[Alex Bunardzic][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[Morisun029](https://github.com/Morisun029)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/alex-bunardzic
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_520X292_openanttrail-2.png?itok=xhD3WmUd (Ants and a leaf making the word "open")
|
||||
[2]: https://opensource.com/article/19/7/failure-feature-blameless-devops
|
||||
[3]: https://en.wikipedia.org/wiki/Test-driven_development
|
||||
[4]: https://www.merriam-webster.com/dictionary/conditio%20sine%20qua%20non
|
||||
[5]: https://opensource.com/sites/default/files/uploads/darwin.png (Charles Darwin)
|
||||
[6]: https://en.wikipedia.org/wiki/Charles_Darwin
|
||||
[7]: https://en.wikipedia.org/wiki/On_the_Origin_of_Species
|
||||
[8]: https://opensource.com/sites/default/files/uploads/environmentalconditions2.png (Environmental pressures on fish)
|
||||
[9]: https://www.youtube.com/watch?v=MgK5Rf7qFaU
|
||||
[10]: https://dotnet.microsoft.com/
|
||||
[11]: https://xunit.net/
|
||||
[12]: https://opensource.com/sites/default/files/uploads/xunit-output.png (xUnit output after the unit test run fails)
|
||||
[13]: https://opensource.com/sites/default/files/uploads/unit-test-success.png (Unit test successful)
|
||||
[14]: https://opensource.com/sites/default/files/uploads/iterating-square-root.png (Code iterating for the square root of 25)
|
||||
[15]: https://opensource.com/sites/default/files/uploads/bestguess.png (Stepwise refinement)
|
||||
[16]: https://en.wikipedia.org/wiki/Uncertainty_principle
|
||||
[17]: https://en.wikipedia.org/wiki/Tractatus_Logico-Philosophicus
|
||||
[18]: https://en.wikipedia.org/wiki/G%C3%B6del%27s_incompleteness_theorems
|
||||
[19]: https://en.wikipedia.org/wiki/Second_law_of_thermodynamics
|
@ -1,8 +1,8 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11464-1.html)
|
||||
[#]: subject: (The lifecycle of Linux kernel testing)
|
||||
[#]: via: (https://opensource.com/article/19/8/linux-kernel-testing)
|
||||
[#]: author: (Major Hayden https://opensource.com/users/mhaydenhttps://opensource.com/users/mhaydenhttps://opensource.com/users/marcobravohttps://opensource.com/users/mhayden)
|
||||
@ -12,33 +12,33 @@ Linux 内核测试的生命周期
|
||||
|
||||
> 内核持续集成(CKI)项目旨在防止错误进入 Linux 内核。
|
||||
|
||||
![arrows cycle symbol for failing faster][1]
|
||||
![](https://img.linux.net.cn/data/attachment/album/201910/16/101933nexzccpea9sjxcq9.jpg)
|
||||
|
||||
在 [Linux 内核的持续集成测试][2] 中,我介绍了 [内核持续集成][3](CKI)项目及其改变内核开发人员和维护人员工作的使命。本文深入探讨了该项目的某些技术方面以及所有部分如何组合在一起。
|
||||
在 [Linux 内核的持续集成测试][2] 一文中,我介绍了 <ruby>[内核持续集成][3]<rt>Continuous Kernel Integration</rt></ruby>(CKI)项目及其使命:改变内核开发人员和维护人员的工作方式。本文深入探讨了该项目的某些技术方面,以及这所有的部分是如何组合在一起的。
|
||||
|
||||
### 一切始于更改
|
||||
### 从一次更改开始
|
||||
|
||||
内核中每一项令人兴奋的功能、改进和错误都始于开发人员提出的更改。这些更改出现在各个内核存储库的大量邮件列表中。一些存储库关注内核中的某些子系统,例如存储或网络,而其它存储库关注内核的更多方面。 当开发人员向内核提出更改或补丁集时,或者维护者在存储库本身中进行更改时,CKI 项目就会付诸行动。
|
||||
|
||||
CKI 项目维护用于监视这些补丁集并采取措施的触发器。诸如 [Patchwork][4] 之类的软件项目通过将多个补丁贡献整合为单个补丁系列,使此过程变得更加容易。补丁系列作为一个整体通过 CKI 系统传播,并可以针对该系列发布单个报告。
|
||||
CKI 项目维护的触发器用于监视这些补丁集并采取措施。诸如 [Patchwork][4] 之类的软件项目通过将多个补丁贡献整合为单个补丁系列,使此过程变得更加容易。补丁系列作为一个整体历经 CKI 系统,并可以针对该系列发布单个报告。
|
||||
|
||||
其他触发器监视存储库中的更改。当内核维护人员合并补丁集、还原补丁或创建新标签时,就会发生这种情况。测试这些关键的更改可确保开发人员始终具有坚实的基线,可以用作编写新补丁的基础。
|
||||
其他触发器可以监视存储库中的更改。当内核维护人员合并补丁集、还原补丁或创建新标签时,就会触发。测试这些关键的更改可确保开发人员始终具有坚实的基线,可以用作编写新补丁的基础。
|
||||
|
||||
所有这些更改都进入了 GitLab CI 管道,并历经多个阶段和多个系统。
|
||||
所有这些更改都会进入 GitLab CI 管道,并历经多个阶段和多个系统。
|
||||
|
||||
### 准备构建
|
||||
|
||||
首先要准备好要编译的源代码。这需要克隆存储库、打上开发人员建议的补丁集,并生成内核配置文件。这些配置文件具有成千上万个用于打开或关闭功能的选项,并且配置文件在不同的系统体系结构之间差异非常大。 例如,一个相当标准的 x86\_64 系统在其配置文件中可能有很多可用选项,但是 s390x 系统(IBM zSeries 大型机)的选项可能要少得多。在该大型机上,某些选项可能有意义,但在消费类笔记本电脑上没有任何作用。
|
||||
|
||||
内核进一步转换为源代码工件。该工件包含整个存储库(已打上补丁)以及编译所需的所有内核配置文件。 上游内核会打包成压缩包,而 Red Hat 的内核生成下一步所用的源代码 RPM 包。
|
||||
内核进一步转换为源代码工件。该工件包含整个存储库(已打上补丁)以及编译所需的所有内核配置文件。 上游内核会打包成压缩包,而 Red Hat 的内核会生成下一步所用的源代码 RPM 包。
|
||||
|
||||
### 成堆的编译
|
||||
|
||||
编译内核会将源代码转换为计算机可以启动和使用的代码。配置文件描述了要构建的内容,内核中的脚本描述了如何构建它,系统上的工具(例如 GCC 和 glibc)完成构建。此过程需要一段时间才能完成,但是 CKI 项目需要针对四种体系结构快速完成:aarch64(64 位 ARM)、ppc64le(POWER)、s390x(IBM zSeries)和 x86\_64。重要的是,我们必须快速编译内核,以便使工作任务不会积压,而开发人员可以及时收到反馈。
|
||||
|
||||
添加更多的 CPU 可以大大提高速度,但是每个系统都有其局限性。CKI 项目在 OpenShift 的部署环境中的容器内编译内核;尽管 OpenShift 可以实现大量的可伸缩性,但部署环境中的可用 CPU 仍然是数量有限的。CKI 团队分配 20 个虚拟 CPU 来编译每个内核。涉及到四个体系结构,这就涨到看 80 个 CPU!
|
||||
添加更多的 CPU 可以大大提高速度,但是每个系统都有其局限性。CKI 项目在 OpenShift 的部署环境中的容器内编译内核;尽管 OpenShift 可以实现高伸缩性,但在部署环境中的可用 CPU 仍然是数量有限的。CKI 团队分配了 20 个虚拟 CPU 来编译每个内核。涉及到四个体系结构,这就涨到了 80 个 CPU!
|
||||
|
||||
另一个速度的提高来自称为 [ccache][5] 的工具。内核开发进展迅速,但是即使在多个发布版本之间,内核的大部分仍保持不变。ccache 工具进行编译期间会在磁盘上缓存已构建的对象(整个内核的一小部分)。稍后再进行另一个内核编译时,ccache 会查找以前看到的内核的未更改部分。ccache 会从磁盘中提取缓存的对象并重新使用它。这样可以加快编译速度并降低总体 CPU 使用率。现在,耗时 20 分钟编译的内核在不到几分钟的时间内就完成了。
|
||||
另一个速度的提高来自 [ccache][5] 工具。内核开发进展迅速,但是即使在多个发布版本之间,内核的大部分仍保持不变。ccache 工具进行编译期间会在磁盘上缓存已构建的对象(整个内核的一小部分)。稍后再进行另一个内核编译时,ccache 会查找以前看到的内核的未更改部分。ccache 会从磁盘中提取缓存的对象并重新使用它。这样可以加快编译速度并降低总体 CPU 使用率。现在,耗时 20 分钟编译的内核在不到几分钟的时间内就完成了。
|
||||
|
||||
### 测试时间
|
||||
|
||||
@ -46,7 +46,7 @@ CKI 项目维护用于监视这些补丁集并采取措施的触发器。诸如
|
||||
|
||||
大型测试框架,例如 [Linux Test Project][6](LTP),包含了大量测试,这些测试在内核中寻找麻烦的回归问题。其中一些回归问题可能会回滚关键的安全修复程序,并且进行测试以确保这些改进仍保留在内核中。
|
||||
|
||||
测试完成后,关键的一步仍然是:报告。内核开发人员和维护人员需要一份简明的报告,准确地告诉他们哪些有效、哪些无效以及如何获取更多信息。每个 CKI 报告都包含所用源代码、编译参数和测试输出的详细信息。该信息可帮助开发人员知道从哪里开始寻找解决问题的方法。此外,它还可以帮助维护人员在漏洞进入内核存储库之前知道何时需要保留补丁集以进行其他的查看。
|
||||
测试完成后,关键的一步仍然是:报告。内核开发人员和维护人员需要一份简明的报告,准确地告诉他们哪些有效、哪些无效以及如何获取更多信息。每个 CKI 报告都包含所用源代码、编译参数和测试输出的详细信息。该信息可帮助开发人员知道从哪里开始寻找解决问题的方法。此外,它还可以帮助维护人员在漏洞进入内核存储库之前知道何时需要保留补丁集以进行其他查看。
|
||||
|
||||
### 总结
|
||||
|
||||
@ -59,7 +59,7 @@ via: https://opensource.com/article/19/8/linux-kernel-testing
|
||||
作者:[Major Hayden][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/) 荣誉推出
|
||||
|
@ -0,0 +1,98 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11469-1.html)
|
||||
[#]: subject: (Command line quick tips: Locate and process files with find and xargs)
|
||||
[#]: via: (https://fedoramagazine.org/command-line-quick-tips-locate-and-process-files-with-find-and-xargs/)
|
||||
[#]: author: (Ben Cotton https://fedoramagazine.org/author/bcotton/)
|
||||
|
||||
命令行技巧:使用 find 和 xargs 查找和处理文件
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
`find` 是日常工具箱中功能强大、灵活的命令行程序之一。它如它名字所暗示的:查找符合你指定条件的文件和目录。借助 `-exec` 或 `-delete` 之类的参数,你可以让它对找到的文件进行操作。
|
||||
|
||||
在[命令行提示][2]系列的这一期中,你将会看到 `find` 命令的介绍,并学习如何使用内置命令或使用 `xargs` 命令处理文件。
|
||||
|
||||
### 查找文件
|
||||
|
||||
`find` 至少要加上查找的路径。例如,此命令将查找(并打印)系统上的每个文件:
|
||||
|
||||
```
|
||||
find /
|
||||
```
|
||||
|
||||
由于一切皆文件,因此你会看到大量的输出。这可能无法帮助你找到所需的内容。你可以更改路径参数缩小范围,但这实际上并没有比使用 `ls` 命令更好。因此,你需要考虑要查找的内容。
|
||||
|
||||
也许你想在家目录中查找所有 JPEG 文件。 `-name` 参数允许你将结果限制为与给定模式匹配的文件。
|
||||
|
||||
```
|
||||
find ~ -name '*jpg'
|
||||
```
|
||||
|
||||
但是等等!如果其中一些扩展名是大写怎么办? `-iname` 类似于 `-name`,但不区分大小写:
|
||||
|
||||
```
|
||||
find ~ -iname '*jpg'
|
||||
```
|
||||
|
||||
很好!但是 8.3 命名方案出自 1985 年。某些图片的扩展名可能是 .jpeg。幸运的是,我们可以将模式使用“或”(`-o`)进行组合。括号需要转义,以便使 `find` 命令而不是 shell 程序尝试解释它们。
|
||||
|
||||
```
|
||||
find ~ \( -iname 'jpeg' -o -iname 'jpg' \)
|
||||
```
|
||||
|
||||
更进一步。如果你有一些以 `jpg` 结尾的目录怎么办?(我不懂你为什么将目录命名为 `bucketofjpg` 而不是 `pictures`?)我们可以加上 `-type` 参数来仅查找文件:
|
||||
|
||||
```
|
||||
find ~ \( -iname '*jpeg' -o -iname '*jpg' \) -type f
|
||||
```
|
||||
|
||||
或者,也许你想找到那些名字奇怪的目录,以便之后可以重命名它们:
|
||||
|
||||
```
|
||||
find ~ \( -iname '*jpeg' -o -iname '*jpg' \) -type d
|
||||
```
|
||||
|
||||
最近你拍摄了很多照片,因此使用 `-mtime`(修改时间)将范围缩小到最近一周修改过的文件。 `-7` 表示 7 天或更短时间内修改的所有文件。
|
||||
|
||||
```
|
||||
find ~ \( -iname '*jpeg' -o -iname '*jpg' \) -type f -mtime -7
|
||||
```
|
||||
|
||||
### 使用 xargs 进行操作
|
||||
|
||||
`xargs` 命令从标准输入流中获取参数,并基于它们执行命令。继续使用上一节中的示例,假设你要将上周修改过的家目录中的所有 JPEG 文件复制到 U 盘,以便插到电子相册上。假设你已经将 U 盘挂载到 `/media/photo_display`。
|
||||
|
||||
```
|
||||
find ~ \( -iname '*jpeg' -o -iname '*jpg' \) -type f -mtime -7 -print0 | xargs -0 cp -t /media/photo_display
|
||||
```
|
||||
|
||||
这里的 `find` 命令与以前的版本略有不同。`-print0` 命令让输出有一些更改:它不使用换行符,而是添加了一个 `null` 字符。`xargs` 的 `-0`(零)选项可调整解析以达到预期效果。这很重要,不然对包含空格、引号或其他特殊字符的文件名执行操作可能无法按预期进行。对文件采取任何操作时,都应使用这些选项。
|
||||
|
||||
`cp` 命令的 `-t` 参数很重要,因为 `cp` 通常要求目的地址在最后。你可以不使用 `xargs` 而使用 `find` 的 `-exec` 执行此操作,但是 `xargs` 的方式会更快,尤其是对于大量文件,因为它会单次调用 `cp`。
|
||||
|
||||
### 了解更多
|
||||
|
||||
这篇文章仅仅是 `find` 可以做的事情的表面。 `find` 支持基于权限、所有者、访问时间等的测试。它甚至可以将搜索路径中的文件与其他文件进行比较。将测试与布尔逻辑相结合,可以为你提供惊人的灵活性,以精确地找到你要查找的文件。使用内置命令或管道传递给 `xargs`,你可以快速处理大量文件。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/command-line-quick-tips-locate-and-process-files-with-find-and-xargs/
|
||||
|
||||
作者:[Ben Cotton][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://fedoramagazine.org/author/bcotton/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2018/10/commandlinequicktips-816x345.jpg
|
||||
[2]: https://fedoramagazine.org/?s=command+line+quick+tips
|
||||
[3]: https://opensource.com/article/18/4/how-use-find-linux
|
||||
[4]: https://unsplash.com/@wflwong?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
||||
[5]: https://unsplash.com/s/photos/search?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
@ -1,21 +1,24 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (laingke)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11462-1.html)
|
||||
[#]: subject: (Viewing files and processes as trees on Linux)
|
||||
[#]: via: (https://www.networkworld.com/article/3444589/viewing-files-and-processes-as-trees-on-linux.html)
|
||||
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
|
||||
|
||||
在 Linux 上以树状查看文件和进程
|
||||
======
|
||||
介绍三个 Linux 命令:ps、pstree 和 tree 以类似树的格式查看文件和进程。
|
||||
|
||||
[Linux][3] 提供了一些方便的命令,用于以树状分支形式查看文件和进程,从而易于查看它们之间的关系。在本文中,我们将介绍 **ps**,**pstree** 和 **tree** 命令以及它们提供的一些选项,这些选项可帮助您将焦点集中在要查看的内容上。
|
||||
> 介绍三个 Linux 命令:ps、pstree 和 tree 以类似树的格式查看文件和进程。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/201910/15/093202rwm5k9pnpntgbtpr.jpg)
|
||||
|
||||
[Linux][3] 提供了一些方便的命令,用于以树状分支形式查看文件和进程,从而易于查看它们之间的关系。在本文中,我们将介绍 `ps`、`pstree` 和 `tree` 命令以及它们提供的一些选项,这些选项可帮助你将注意力集中在要查看的内容上。
|
||||
|
||||
### ps
|
||||
|
||||
我们用来列出进程的 **ps** 命令有一些有趣的选项,但是很多人从来没有利用过。虽然常用的 **ps -ef** 提供了正在运行的进程的完整列表,但是 **ps -ejH** 命令增加了一个不错的效果。它缩进了相关的进程以使这些进程之间的关系在视觉上更加清晰——就像这个片段:
|
||||
我们用来列出进程的 `ps` 命令有一些有趣的选项,但是很多人从来没有利用过。虽然常用的 `ps -ef` 提供了正在运行的进程的完整列表,但是 `ps -ejH` 命令增加了一个不错的效果。它缩进了相关的进程以使这些进程之间的关系在视觉上更加清晰——就像这个片段:
|
||||
|
||||
```
|
||||
$ ps -ejH
|
||||
@ -28,9 +31,9 @@ $ ps -ejH
|
||||
30968 30968 28410 pts/0 00:00:00 ps
|
||||
```
|
||||
|
||||
可以看到,正在运行的 ps 进程是在 bash 中运行的,而 bash 是在 ssh 会话中运行的。
|
||||
可以看到,正在运行的 `ps` 进程是在 `bash` 中运行的,而 `bash` 是在 ssh 会话中运行的。
|
||||
|
||||
**-exjf** 选项字符串提供了类似的视图,但是带有一些其它细节和符号以突出显示进程的层次结构性质:
|
||||
`-exjf` 选项字符串提供了类似的视图,但是带有一些其它细节和符号以突出显示进程的层次结构性质:
|
||||
|
||||
```
|
||||
$ ps -exjf
|
||||
@ -46,14 +49,14 @@ PPID PID PGID SID TTY TPGID STAT UID TIME COMMAND
|
||||
命令中使用的这些选项表示:
|
||||
|
||||
```
|
||||
-e select all processes
|
||||
-j use the jobs format
|
||||
-f provide a full format listing
|
||||
-H show the process hierarchy (i.e., the "forest format")
|
||||
-x lift the "must be associated with a tty" restriction
|
||||
-e 选择所有进程
|
||||
-j 使用工作格式
|
||||
-f 提供完整格式列表
|
||||
-H 分层显示进程(如,树状格式)
|
||||
-x 取消“必须与 tty 相关联”的限制
|
||||
```
|
||||
|
||||
命令同时也有一个 **\--forest** 选项提供了类似的视图。
|
||||
同时,该命令也有一个 `--forest` 选项提供了类似的视图。
|
||||
|
||||
```
|
||||
$ ps -ef --forest
|
||||
@ -66,11 +69,11 @@ shs 28410 28409 0 12:56 pts/0 00:00:00 \_ -bash
|
||||
shs 32351 28410 0 14:39 pts/0 00:00:00 \_ ps -ef --forest
|
||||
```
|
||||
|
||||
注意,这些示例只是这些命令如何使用的示例。您可以选择最适合您的流程视图的任何选项组合。
|
||||
注意,这些示例只是这些命令如何使用的示例。你可以选择最适合你的进程视图的任何选项组合。
|
||||
|
||||
### pstree
|
||||
|
||||
使用 **pstree** 命令可以获得类似的进程视图。尽管 **pstree** 具备了许多选项,但是该命令本身就提供了非常有用的显示。注意,许多父子进程关系显示在单行而不是后续行上。
|
||||
使用 `pstree` 命令可以获得类似的进程视图。尽管 `pstree` 具备了许多选项,但是该命令本身就提供了非常有用的显示。注意,许多父子进程关系显示在单行而不是后续行上。
|
||||
|
||||
```
|
||||
$ pstree
|
||||
@ -86,7 +89,7 @@ $ pstree
|
||||
│ └─xdg-permission-───2*[{xdg-permission-}]
|
||||
```
|
||||
|
||||
通过 **-n** 选项,**pstree** 以数值(按进程 ID)顺序显示进程:
|
||||
通过 `-n` 选项,`pstree` 以数值(按进程 ID)顺序显示进程:
|
||||
|
||||
```
|
||||
$ pstree -n
|
||||
@ -117,17 +120,17 @@ systemd─┬─systemd-journal
|
||||
├─sshd───sshd───sshd───bash───pstree
|
||||
```
|
||||
|
||||
使用 **pstree** 时要考虑的一些选项包括 **-a**(包括命令行参数)和 **-g**(包括进程组)。
|
||||
使用 `pstree` 时可以考虑的一些选项包括 `-a`(包括命令行参数)和 `-g`(包括进程组)。
|
||||
|
||||
以下是一些简单的示例(片段)。
|
||||
|
||||
命令 **pstree -a** 的输出内容:
|
||||
命令 `pstree -a` 的输出内容:
|
||||
|
||||
```
|
||||
└─wpa_supplicant -u -s -O /run/wpa_supplicant
|
||||
```
|
||||
|
||||
命令 **pstree -g** 的输出内容:
|
||||
命令 `pstree -g` 的输出内容:
|
||||
|
||||
```
|
||||
├─sshd(1396)───sshd(28281)───sshd(28281)───bash(28410)───pstree(1115)
|
||||
@ -135,9 +138,10 @@ systemd─┬─systemd-journal
|
||||
|
||||
### tree
|
||||
|
||||
虽然 **tree** 命令听起来与 **pstree** 非常相似,但这是用于查看文件而非进程的命令。它提供了一个漂亮的树状目录和文件视图。
|
||||
虽然 `tree` 命令听起来与 `pstree` 非常相似,但这是用于查看文件而非进程的命令。它提供了一个漂亮的树状目录和文件视图。
|
||||
|
||||
如果你使用 `tree` 命令查看 `/proc` 目录,你显示的开头部分将类似于这个:
|
||||
|
||||
如果你使用 **tree** 命令查看 **/proc** 目录,你显示的开头将类似于这个:
|
||||
```
|
||||
$ tree /proc
|
||||
/proc
|
||||
@ -164,9 +168,9 @@ $ tree /proc
|
||||
...
|
||||
```
|
||||
|
||||
如果以 root 权限运行这条命令(**sudo tree /proc**),你将会看到更多详细信息,因为 **/proc** 目录的许多内容对于普通用户而言是无法访问的。
|
||||
如果以 root 权限运行这条命令(`sudo tree /proc`),你将会看到更多详细信息,因为 `/proc` 目录的许多内容对于普通用户而言是无法访问的。
|
||||
|
||||
命令 **tree -d** 将会限制仅显示目录。
|
||||
命令 `tree -d` 将会限制仅显示目录。
|
||||
|
||||
```
|
||||
$ tree -d /proc
|
||||
@ -191,7 +195,7 @@ $ tree -d /proc
|
||||
...
|
||||
```
|
||||
|
||||
使用 **-f** 选项,**tree** 命令会显示完整的路径。
|
||||
使用 `-f` 选项,`tree` 命令会显示完整的路径。
|
||||
|
||||
```
|
||||
$ tree -f /proc
|
||||
@ -214,7 +218,7 @@ $ tree -f /proc
|
||||
...
|
||||
```
|
||||
|
||||
分层显示通常可以使进程和文件之间的关系更容易理解。可用选项的数量很多,而你总可能会找到一些视图,帮助你查看所需的内容。
|
||||
分层显示通常可以使进程和文件之间的关系更容易理解。可用选项的数量很多,而你总可以找到一些视图,帮助你查看所需的内容。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -223,7 +227,7 @@ via: https://www.networkworld.com/article/3444589/viewing-files-and-processes-as
|
||||
作者:[Sandra Henry-Stocker][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[laingke](https://github.com/laingke)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,124 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (singledo)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11470-1.html)
|
||||
[#]: subject: (How to Unzip a Zip File in Linux [Beginner’s Tutorial])
|
||||
[#]: via: (https://itsfoss.com/unzip-linux/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
新手教程:如何在 Linux 下解压 Zip 文件
|
||||
======
|
||||
|
||||
> 本文将会向你展示如何在 Ubuntu 和其他 Linux 发行版本上解压文件。终端和图形界面的方法都会讨论。
|
||||
|
||||
[Zip][1] 是一种创建压缩存档文件的最普通、最流行的方法。它也是一种古老的文件归档文件格式,这种格式创建于 1989 年。由于它的广泛使用,你会经常遇见 zip 文件。
|
||||
|
||||
在更早的一份教程里,我介绍了[如何在 Linux 上用 zip 压缩一个文件夹][2]。在这篇面向初学者的快速教程中,我会介绍如何在 Linux 上解压文件。
|
||||
|
||||
先决条件:检查你是否安装了 `unzip`。
|
||||
|
||||
为了解压 zip 归档文件,你必须在你的系统上安装了 unzip 软件包。大多数现代的的 Linux 发行版本提供了解压 zip 文件的支持,但是对这些 zip 文件进行校验以避免以后出现损坏总是没有坏处的。
|
||||
|
||||
在基于 [Unbutu][3] 和 [Debian][4] 的发行版上,你能够使用下面的命令来安装 `unzip`。如果你已经安装了,你会被告知已经被安装。
|
||||
|
||||
```
|
||||
sudo apt install unzip
|
||||
```
|
||||
|
||||
一旦你能够确认你的系统中安装了 `unzip`,你就可以通过 `unzip` 来解压 zip 归档文件。
|
||||
|
||||
你也能够使用命令行或者图形工具来达到目的,我会向你展示两种方法:
|
||||
|
||||
### 使用命令行解压文件
|
||||
|
||||
在 Linux 下使用 `unzip` 命令是非常简单的。在你放 zip 文件的目录,用下面的命令:
|
||||
|
||||
```
|
||||
unzip zipped_file.zip
|
||||
```
|
||||
|
||||
你可以给 zip 文件提供解压路径而不是解压到当前所在路径。你会在终端输出中看到提取的文件:
|
||||
|
||||
```
|
||||
unzip metallic-container.zip -d my_zip
|
||||
Archive: metallic-container.zip
|
||||
inflating: my_zip/625993-PNZP34-678.jpg
|
||||
inflating: my_zip/License free.txt
|
||||
inflating: my_zip/License premium.txt
|
||||
```
|
||||
|
||||
上面的命令有一个小问题。它会提取 zip 文件中所有的内容到现在的文件夹。你会在当前文件夹下留下一堆没有组织的文件,这不是一件很好的事情。
|
||||
|
||||
#### 解压到文件夹下
|
||||
|
||||
在 Linux 命令行下,对于把文件解压到一个文件夹下是一个好的做法。这种方式下,所有的提取文件都会被存储到你所指定的文件夹下。如果文件夹不存在,会创建该文件夹。
|
||||
|
||||
```
|
||||
unzip zipped_file.zip -d unzipped_directory
|
||||
```
|
||||
|
||||
现在 `zipped_file.zip` 中所有的内容都会被提取到 `unzipped_directory` 中。
|
||||
|
||||
由于我们在讨论好的做法,这里有另一个注意点,我们可以查看压缩文件中的内容而不用实际解压。
|
||||
|
||||
#### 查看压缩文件中的内容而不解压压缩文件
|
||||
|
||||
```
|
||||
unzip -l zipped_file.zip
|
||||
```
|
||||
|
||||
下面是该命令的输出:
|
||||
|
||||
```
|
||||
unzip -l metallic-container.zip
|
||||
Archive: metallic-container.zip
|
||||
Length Date Time Name
|
||||
--------- ---------- ----- ----
|
||||
6576010 2019-03-07 10:30 625993-PNZP34-678.jpg
|
||||
1462 2019-03-07 13:39 License free.txt
|
||||
1116 2019-03-07 13:39 License premium.txt
|
||||
--------- -------
|
||||
6578588 3 files
|
||||
```
|
||||
|
||||
在 Linux 下,还有些 `unzip` 的其它用法,但我想你现在已经对在 Linux 下使用解压文件有了足够的了解。
|
||||
|
||||
### 使用图形界面来解压文件
|
||||
|
||||
如果你使用桌面版 Linux,那你就不必总是使用终端。在图形化的界面下,我们又要如何解压文件呢? 我使用的是 [GNOME 桌面][7],不过其它桌面版 Linux 发行版也大致相同。
|
||||
|
||||
打开文件管理器,然后跳转到 zip 文件所在的文件夹下。在文件上点击鼠标右键,你会在弹出的窗口中看到 “提取到这里”,选择它。
|
||||
|
||||
![Unzip File in Ubuntu][8]
|
||||
|
||||
与 `unzip` 命令不同,这个提取选项会创建一个和压缩文件名相同的文件夹(LCTT 译注:文件夹没有 `.zip` 扩展名),并且把压缩文件中的所有内容存储到创建的文件夹下。相对于 `unzip` 命令的默认行为是将压缩文件提取到当前所在的文件下,图形界面的解压对于我来说是一件非常好的事情。
|
||||
|
||||
这里还有一个选项“提取到……”,你可以选择特定的文件夹来存储提取的文件。
|
||||
|
||||
你现在知道如何在 Linux 解压文件了。你也许还对学习[在 Linux 下使用 7zip][9] 感兴趣?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/unzip-linux/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[octopus](https://github.com/singledo)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://en.wikipedia.org/wiki/Zip_(file_format)
|
||||
[2]: https://itsfoss.com/linux-zip-folder/
|
||||
[3]: https://ubuntu.com/
|
||||
[4]: https://www.debian.org/
|
||||
[5]: tmp.eqEocGssC8#terminal
|
||||
[6]: tmp.eqEocGssC8#gui
|
||||
[7]: https://gnome.org/
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/10/unzip-files-ubuntu.jpg?ssl=1
|
||||
[9]: https://itsfoss.com/use-7zip-ubuntu-linux/
|
||||
|
||||
|
@ -0,0 +1,103 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (System76 will ship Coreboot-powered firmware, a new OS for the apocalypse, and more open source news)
|
||||
[#]: via: (https://opensource.com/article/19/10/news-october-13)
|
||||
[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo)
|
||||
|
||||
System76 will ship Coreboot-powered firmware, a new OS for the apocalypse, and more open source news
|
||||
======
|
||||
Catch up on the biggest open source headlines from the past two weeks.
|
||||
![Weekly news roundup with TV][1]
|
||||
|
||||
In this edition of our open source news roundup, we cover System76 shipping Coreboot-powered firmware, a new OS for the apocalypse, and more open source news!
|
||||
|
||||
### System76 will ship 2 Linux laptops with Coreboot-powered open source firmware
|
||||
|
||||
The Denver-based Linux PC manufacturer announced plans to start shipping two laptop models with its Coreboot-powered open source firmware later this month. Jason Evangelho, Senior Contributor at _Forbes_, cited this move as a march towards offering open source software and hardware from the ground up.
|
||||
|
||||
System76, which also develops [Pop OS][2], is now taking pre-orders for its Galago Pro and Darter Pro laptops. It claims that Coreboot will let users boot from power off to the desktop 29% faster.
|
||||
|
||||
Coreboot is a lightweight firmware designed to simplify the boot cycle of systems using it. It requires the minimum number of tasks needed to load and run a modern 32-bit or 64-bit operating system. Coreboot can offer a replacement for proprietary firmware, though it omits features like execution environments. Our own [Don Watkins][3] asked if Coreboot will ship on other System76 machines. Their response, [as reported by _Forbes_][4]:
|
||||
|
||||
> _"Yes. Long term, System76 is working to open source all aspects of the computer. Thelio Io, the controller board in the Thelio desktop, is both open hardware and open firmware. This is a long journey but we're picking up speed. It's been less than a year since the our open hardware Thelio desktop was released and we're now producing two laptops with System76 Open Firmware."_
|
||||
|
||||
### Collapse OS is an operating system for the post-apocalypse
|
||||
|
||||
Virgil Dupras, a software developer based in Quebec, is convinced the world's global supply chain will collapse before 2030. And he's worried that most [electronics will get caught in the crosshairs][5] due to "a very complex supply chain that we won't be able to achieve again for decades (ever?)."
|
||||
|
||||
To prepare for the worst, Dupras built Collapse OS. It's [designed to run][6] on "minimal or improvised machines" and perform simple tasks that are helpful in a post-apocalyptic society. These include editing text files, collecting sources files for MCUs and CPUs, and reading/writing from several storage devices.
|
||||
|
||||
Dupras says it's intended for worst-case scenarios, and that a "weak collapse" might not be enough to justify its use. If you err on the side of caution, the Collapse OS project is accepting new contributors [on GitHub][7].
|
||||
|
||||
Per the project website, Dupras says his goal is for Collapse OS to be as self-contained as possible with the ability for users to install the OS without Internet access or other resources. Ideally, the goal is for Collapse OS to not be used at all.
|
||||
|
||||
### ExpressionEngine will stay open source post-acquisition
|
||||
|
||||
The team behind open source CMS ExpressEngine was acquired by Packet Tide - EEHarbor's parent company - in early October. [This announcement ][8]comes one year after Digital Locations acquired EllisLab, which develops EE core.
|
||||
|
||||
[In an announcement][9] on ExpressionEngine's website, EllisLab founder Rick Ellis said Digital Locations wasn't a good fit for ExpressionEngine. Citing Digital Location's goals to build an AI business, Ellis realized several months ago that ExpressionEngine needed a new home:
|
||||
|
||||
> _"We decided that what was best for ExpressionEngine was to seek a new owner, one that could devote all the resources necessary for ExpressionEngine to flourish. Our top candidate was Packet Tide due to their development capability, extensive catalog of add-ons, and deep roots in the ExpressionEngine community._
|
||||
>
|
||||
> _We are thrilled that they immediately expressed enthusiastic interest in becoming the caretakers of ExpressionEngine."_
|
||||
|
||||
Ellis says Packet Tide's first goal is to finish building ExpressionEngine 6.0, which will have a new control panel with a dark theme (who doesn't love dark mode?). ExpressionEngine adopted the Apache License Version 2.0 in November 2018, after 16 years as a proprietary tool.
|
||||
|
||||
The tool is still marketed as an open source CMS, and EE Harbor developer Tom Jaeger said [in the EE Slack][10] that their plan is to keep ExpressionEngine open source now. But he also left the door open to possible changes.
|
||||
|
||||
### McAfee and IBM Security to lead the Open Source Cybersecurity Alliance
|
||||
|
||||
The two tech giants will contribute the initiative's first open source code and content, under guidance from the OASIS consortium. The Alliance aims to share best practices, tech stacks, and security solutions in an open source platform.
|
||||
|
||||
Carol Geyer, chief development officer of OASIS, said the lack of standard language makes it hard for businesses to share data between tools and products. Despite efforts to collaborate, the lack of a standardized format yields more integration costs that are expensive and time-consuming.
|
||||
|
||||
In lieu of building connections and integrations, [the Alliance wants members][11] to "develop protocols and standards which enable tools to work together and share information across vendors."
|
||||
|
||||
According to _Tech Republic_, IBM Security will contribute [STIX-Shifter][12], an open source library that offer a universal security system. Meanwhile, McAfee added its [OpenDXL Standard Ontology][13], a cybersecurity messaging format. Other members of the Alliance include CrowdStrike, CyberArk, and SafeBreach.
|
||||
|
||||
#### In other news
|
||||
|
||||
* [Paris uses open source to get closer to the citizen][14]
|
||||
* [SD Times open source project of the week: ABAP SDK for IBM Watson][15]
|
||||
* [Google's keeping Knative development under its thumb 'for the foreseeable future'][16]
|
||||
* [Devs engage in soul-searching on future of open source][17]
|
||||
* [Why leading Formula 1 teams back 'copycat' open source design idea][18]
|
||||
|
||||
|
||||
|
||||
_Thanks, as always, to Opensource.com staff members and moderators for their help this week._
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/10/news-october-13
|
||||
|
||||
作者:[Lauren Maffeo][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/lmaffeo
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/weekly_news_roundup_tv.png?itok=B6PM4S1i (Weekly news roundup with TV)
|
||||
[2]: https://system76.com/pop
|
||||
[3]: https://opensource.com/users/don-watkins
|
||||
[4]: https://www.forbes.com/sites/jasonevangelho/2019/10/10/system76-will-begin-shipping-2-linux-laptops-with-coreboot-based-open-source-firmware/#15a4da174e64
|
||||
[5]: https://collapseos.org/why.html
|
||||
[6]: https://www.digitaltrends.com/cool-tech/collapse-os-after-societys-collapse/
|
||||
[7]: https://github.com/hsoft/collapseos
|
||||
[8]: https://wptavern.com/expressionengine-under-new-ownership-will-remain-open-source-for-now
|
||||
[9]: https://expressionengine.com/blog/expressionengine-has-a-new-owner
|
||||
[10]: https://eecms.slack.com/?redir=%2Farchives%2FC04CUNNR9%2Fp1570576465005500
|
||||
[11]: https://www.techrepublic.com/article/mcafee-ibm-join-forces-for-global-open-source-cybersecurity-initiative/
|
||||
[12]: https://github.com/opencybersecurityalliance/stix-shifter
|
||||
[13]: https://www.opendxl.com/
|
||||
[14]: https://www.smartcitiesworld.net/special-reports/special-reports/paris-uses-open-source-to-get-closer-to-the-citizen
|
||||
[15]: https://sdtimes.com/os/sd-times-open-source-project-of-the-week-abap-sdk-for-ibm-watson/
|
||||
[16]: https://www.datacenterknowledge.com/google-alphabet/googles-keeping-knative-development-under-its-thumb-foreseeable-future
|
||||
[17]: https://www.linuxinsider.com/story/86282.html
|
||||
[18]: https://www.autosport.com/f1/news/146407/why-leading-f1-teams-back-copycat-design-proposal
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (hopefully2333)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,153 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Top 10 open source video players for Linux)
|
||||
[#]: via: (https://opensourceforu.com/2019/10/top-10-open-source-video-players-for-linux/)
|
||||
[#]: author: (Stella Aldridge https://opensourceforu.com/author/stella-aldridge/)
|
||||
|
||||
Top 10 open source video players for Linux
|
||||
======
|
||||
|
||||
[![][1]][2]
|
||||
|
||||
_Choosing the right video player can help ensure that you get the optimum viewing experience, and give you the tools to [create a video website][3]. You can even allow you to customize the videos you are watching to your personal preferences too._
|
||||
|
||||
So to help enable you to pick the best player for your needs, we’ve curated a list of the top open source video players for Linux.
|
||||
|
||||
Let’s take a look:
|
||||
|
||||
**1\. XBMC – Kodi Media Center**
|
||||
|
||||
This is a flexible cross-platform player, written with C++ as core and with Python Scripts as add ons are available. The benefits of using Kodi include:
|
||||
|
||||
* Available in over 69 languages
|
||||
* Users can play audio and video files and media player files from the network and local storage
|
||||
* Can be used alongside JeOS in devices such as Smart TV and set-top boxes as an application suite
|
||||
* There’s loads of impressive add ons such as video and audio streaming plugins, themes, screensaver and more
|
||||
* It supports multiple formats such as MPEG-1,2,4, RealVideo, HVC, HEVC and so on
|
||||
|
||||
|
||||
|
||||
**2\. VLC Media Player**
|
||||
|
||||
This player was a no brainer for this list due to its impressive power and availability on a range of operating systems. It is written in C, C++ and Objective C and users can eliminate the need for figuring out plugins thanks to its extensive support of decoding libraries. The benefits of VLC Media Player include:
|
||||
|
||||
* Provides support for DVD players on Linux
|
||||
* Ability to play .iso files
|
||||
* Enables high definition recordings of D-VHS tapes to be played
|
||||
* Can be run from a USB flash drive or external drive directly
|
||||
* API support and browser support (via plugin)
|
||||
|
||||
|
||||
|
||||
**3\. Bomi (CMPlayer)**
|
||||
|
||||
This flexible and highly powered player ticks most of the boxes of a general user, and it’s positives are:
|
||||
|
||||
* Simple to use graphical user interface (GUI)
|
||||
* Impressive playback ability
|
||||
* Option to resume playback
|
||||
* Supports subtitles and can render multiple subtitle files
|
||||
|
||||
|
||||
|
||||
**[![][4]][5]4\. Miro Music and Video Player**
|
||||
|
||||
Previously called Democracy Player (DTV), Miro was redeveloped by Participatory Culture Foundation and is a good cross-platform player for both video and audio. It’s impressive because:
|
||||
|
||||
* Supportive of some HD Audio and Video
|
||||
* Available in over 40 languages
|
||||
* Can play numerous file formats, e.g., QuickTime, WMV, MPEG files, Audio Video Interface (AVI), XVID
|
||||
* Can notify the user and download a video automatically once available
|
||||
|
||||
|
||||
|
||||
**5\. SMPlayer**
|
||||
|
||||
This cross-platform media player, written only using Qt library in C++ is a powerful, multi-functional player. We like it because:
|
||||
|
||||
* It has multi-language options
|
||||
* Supportive of all default formats
|
||||
* Supportive of EDL files, and you can configure subtitles fetched from the Internet
|
||||
* A variety of Skins that can be downloaded from the Internet
|
||||
* Multiple speed playback
|
||||
|
||||
|
||||
|
||||
**6\. MPV Player**
|
||||
|
||||
Written in C, Objective-C, Lua, and Python, it’s free, easy to use and has lots of new features which make it enjoyable to use. The main plus points are:
|
||||
|
||||
* Can be compiled as a library which uncovers client API’s which leads to increased control
|
||||
* Functionality that allows Media Encoding
|
||||
* Smooth-motion
|
||||
|
||||
|
||||
|
||||
**7\. Deepin Movie**
|
||||
|
||||
This player is an excellent example of an open source media player which has lots of positives, including:
|
||||
|
||||
* The ability to complete all play operations by keyboard
|
||||
* Video files in various formats can be played through this player with ease
|
||||
* The streaming function allows users to enjoy many online video resources
|
||||
|
||||
|
||||
|
||||
**8\. Gnome Videos**
|
||||
|
||||
Previously called Totem, for those with Gnome desktop environments, this is the player of choice.
|
||||
Written purely in C this was built by using GStreamer multimedia framework for playback, and the other version (> 2.7.1) was then configured using xine libraries as a backend. It’s great because:
|
||||
|
||||
It has an impressive ability to support numerous formats including:
|
||||
|
||||
* SHOUTcast, SMIL, M3U, Windows Media Player format and more
|
||||
* You can adjust light settings such as brightness and contrast during playback
|
||||
* Loads SubRip subtitles
|
||||
* Supports for direct video playback from Internet channels such as Apple
|
||||
|
||||
|
||||
|
||||
**9\. Xine Multimedia Player**
|
||||
|
||||
An additional cross-platform multimedia player in our list written in C. It’s a good all-round player because:
|
||||
|
||||
* It supports physical media as well as Video Devices. Think 3gp, Matroska, MOV, Mp4, Audio formats,
|
||||
* Network Protocols, V4L, DVB, and PVR to name but a few
|
||||
* It can correct the synchronization of audio and video streams manually
|
||||
|
||||
|
||||
|
||||
**10\. ExMPlayer**
|
||||
|
||||
Last but not least, ExMPlayer is a stunning, powerfully built GUI front-end for MPlayer. Its benefits include:
|
||||
|
||||
* Can play any media format
|
||||
* Supports network streaming and subtitles
|
||||
* Easy to use an audio converter
|
||||
* High-quality audio extraction without compromising on sound quality
|
||||
|
||||
|
||||
|
||||
The abovementioned video players work well on Linux. We would recommend you to try them out and choose the most suitable for you.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensourceforu.com/2019/10/top-10-open-source-video-players-for-linux/
|
||||
|
||||
作者:[Stella Aldridge][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://opensourceforu.com/author/stella-aldridge/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i2.wp.com/opensourceforu.com/wp-content/uploads/2019/10/Depositphotos_50337841_l-2015.jpg?resize=696%2C585&ssl=1 (Depositphotos_50337841_l-2015)
|
||||
[2]: https://i2.wp.com/opensourceforu.com/wp-content/uploads/2019/10/Depositphotos_50337841_l-2015.jpg?fit=900%2C756&ssl=1
|
||||
[3]: https://www.ning.com/create-video-website/
|
||||
[4]: https://i2.wp.com/opensourceforu.com/wp-content/uploads/2019/10/Depositphotos_20380441_l-2015.jpg?resize=350%2C231&ssl=1
|
||||
[5]: https://i2.wp.com/opensourceforu.com/wp-content/uploads/2019/10/Depositphotos_20380441_l-2015.jpg?ssl=1
|
@ -0,0 +1,55 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How the oil and gas industry exploits IoT)
|
||||
[#]: via: (https://www.networkworld.com/article/3445204/how-the-oil-and-gas-industry-exploits-iot.html)
|
||||
[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/)
|
||||
|
||||
How the oil and gas industry exploits IoT
|
||||
======
|
||||
The energy industry has embraced IoT technology in its operations, from monitoring well production to predicting when its gear will need maintenance.
|
||||
Like many traditional industries that have long-standing, tried-and-true methods of operation, the oil-and-gas sector hasn’t been the quickest to embrace [IoT][1] technology – despite having had instrumentation on drilling rigs, pipelines and refining facilities for decades, the extraction industry has only recently begun to work with modern IoT.
|
||||
|
||||
Part of the issue has been interoperability, according to Mark Carrier, oil-and-gas development director for RTI, which produces connectivity software for industrial companies. Energy companies are most comfortable working with the same vendors they’ve worked with before, but that tendency means there isn’t a strong impetus toward sharing data across platforms.
|
||||
|
||||
[[Get regularly scheduled insights by signing up for Network World newsletters.]][2]
|
||||
|
||||
“On a very low level, things are pretty well-connected, at the connectivity to the back-end they’re well-connected, but there’s a huge expense in understanding what that data is,” he said.
|
||||
|
||||
Christine Boles, a vice president in Intel’s IoT group, said that the older systems still being used by the industry have been tough to displace.
|
||||
|
||||
“The biggest challenge they’re facing is aging infrastructrure, and how they get to a more standardized, interoperable version,” she said.
|
||||
|
||||
Changes are coming, however, in part because energy prices have taken a hit in recent years. Oil companies have been looking to cut costs, and one of the easiest places to do that is in integration and automation. On a typical oil well, said Carrier, a driller will have up to 70 different companies’ products working – sensors covering everything from flow rates to temperature and pressure to azimuth and incline, different components of the drill itself – but until fairly recently, these all had to be independently monitored.
|
||||
|
||||
An IoT solution that can tie all these various threads of data together, of late, has become an attractive option for companies looking to minimize human error and glean real-time insights from the wide range of instrumentation present on the average oil rig.
|
||||
|
||||
Those threads are numerous, with a lot of vertically unique sensor and endpoint types. Mud pulse telemetry uses a module in a drill head to create slight fluctuations in the pressure of drilling fluid to pulse information to a receiver on the surface. Temperature and pressure sensors operating in the extreme environmental conditions of an active borehole might use heavily ruggedized serial cable to push data back aboveground.
|
||||
|
||||
Andre Kindness, a principal analyst at Forrester Research, said that the wide range of technologies, manufacturers and standards in use at any given oil-and-gas facility is the product of cutthroat competition
|
||||
|
||||
To continue reading this article register now
|
||||
|
||||
[Get Free Access][3]
|
||||
|
||||
[Learn More][4] Existing Users [Sign In][3]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3445204/how-the-oil-and-gas-industry-exploits-iot.html
|
||||
|
||||
作者:[Jon Gold][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.networkworld.com/author/Jon-Gold/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.networkworld.com/article/3207535/what-is-iot-how-the-internet-of-things-works.html
|
||||
[2]: https://www.networkworld.com/newsletters/signup.html
|
||||
[3]: javascript://
|
||||
[4]: https://www.networkworld.com/learn-about-insider/
|
@ -0,0 +1,170 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (The Role of Open Source Tools and Concepts in IoT Security)
|
||||
[#]: via: (https://opensourceforu.com/2019/10/the-role-of-open-source-tools-and-concepts-in-iot-security/)
|
||||
[#]: author: (Shashidhar Soppin https://opensourceforu.com/author/shashidhar-soppin/)
|
||||
|
||||
The Role of Open Source Tools and Concepts in IoT Security
|
||||
======
|
||||
|
||||
[![][1]][2]
|
||||
|
||||
_With IoT devices permeating the commercial and personal space, their security becomes important. Hackers and malicious agents are always trying to exploit vulnerabilities in order to control these devices. The advantages of using open source rather than proprietary software needs no elaboration. Here is a selection of open source tools popular in the IoT field._
|
||||
|
||||
Security is one of the key factors to consider while choosing any IoT platform. The IoT market is very large and is growing constantly. Scary hacks and security breaches are happening to IoT related devices on a regular basis. These could be DoS (Denial of Service) attacks or may completely wipe out the firmware sitting on top of the device. Early detection and prevention of these attacks is a major concern for any enterprise or organisation. Many companies are adopting open source security tools and solutions and laying out predefined best practices for IoT security.
|
||||
|
||||
![Figure 1: The Mirai botnet][3]
|
||||
|
||||
**Recent security attacks**
|
||||
As explained earlier, many attacks and threats targeting IoT systems have happened during the last few years. Let’s look at some of the major ones.
|
||||
|
||||
_**The Silex malware attack**_: In 2019, a 14-year-old hacker bricked at least around 4,000 IoT devices with a new strain of malware called Silex, which was used to abruptly shut down command and control servers. Larry Cashdollar, who is a senior security intelligence response engineer at Akamai, first discovered this malware on his honeypot. Like the BrickerBot malware in 2017, Silex too targeted insecure IoT devices and made them unusable.
|
||||
|
||||
Silex trashes an IoT device’s storage, dropping firewall rules, removing the network configuration and then halting the device completely. It is as destructive as it can get without actually frying the IoT device’s circuits. To recover, victims must manually reinstall the device’s firmware, a task too complicated for most device owners. (_<https://www.bleepingcomputer.com/news/security/new-silex-malware-trashes-iot-devices-using-default-passwords/>_)
|
||||
|
||||
_**The BrickerBot attack**_: The BrickerBot malware attack took place in 2017 and its author has claimed that 60,000 modems and routers across India lost Internet connectivity. The incident affected modems and routers belonging to two Indian state-owned telecommunications service providers, Bharat Sanchar Nigam Limited (BSNL) and Mahanagar Telephone Nigam Limited (MTNL). The attack was so intensive that from July 25 and up to July 29, users reported losing Internet connectivity as routers and modems became stuck with their red LED remaining always on. The main purpose of this bot is to brick devices so they will not be usable once attacked. (_<https://www.bleepingcomputer.com/news/security/brickerbot-author-retires-claiming-to-have-bricked-over-10-million-iot-devices/>_)
|
||||
|
||||
![Figure 2: Princeton IoT Icon][4]
|
||||
|
||||
**Note:** _Bricking is the process of changing the code of the device so that the hardware can no longer be used, thereby turning the device essentially into a brick (totally unusable)._
|
||||
|
||||
**The Mirai botnet attack:** The Mirai botnet attack took place in 2016. This was a major malware/virus attack. Mirai is a self-propagating botnet virus. The source code for it was made publicly available by the author after a successful and well-publicised attack on the Krebbs website. Since then, the source code has been built and used by many others to launch attacks on Internet infrastructure, causing major damage. The Mirai botnet code infects poorly protected Internet devices by using telnet to find those that are still using their factory default usernames and passwords. The effectiveness of Mirai is due to its ability to infect tens of thousands of these insecure devices and co-ordinate them to mount a DDoS attack against a chosen victim. (_<https://www.corero.com/resources/ddos-attack-types/mirai-botnet-ddos-attack>_)
|
||||
|
||||
**Detection and prevention of security attacks**
|
||||
The major cause of concern in IoT devices is the use of the Linux OS by the device vendors instead of developing a custom OS, which is time consuming and expensive. Most of the attackers/hackers know this and so target these devices.
|
||||
|
||||
Some time back, Symantec came up with a solution for this by using a router called Norton Core (_<https://us.norton.com/core>_). This was not a success as it was expensive and had a monthly maintenance cost. In addition, people felt that it was too early to use such a router that came with a monthly subscription, since most homes still do not have enough IoT enabled devices to make such an investment worthwhile.
|
||||
|
||||
**Open source security tools**
|
||||
Subsequently, many state-of-art security tools with multiple security features have been launched. Some of the most used and popular open source security tools are featured below.
|
||||
|
||||
**Princeton IoT-Inspector**
|
||||
This is an open source desktop tool with a one-click, easy-to-install process. It has many built-in security validation features:
|
||||
|
||||
* Automatically discovers IoT devices and analyses their network traffic.
|
||||
* Helps one to identify security and privacy issues with graphs and tables.
|
||||
* Requires minimal technical skills and no special hardware.
|
||||
|
||||
|
||||
|
||||
This tool can be configured on Linux/Mac (Windows support is still under discussion).
|
||||
|
||||
**What data does IoT Inspector collect?** For each IoT device in the network, IoT Inspector collects the following information and sends it to identified secure servers at the Princeton University:
|
||||
|
||||
* Device manufacturers, based on the first six characters of the MAC address of each device on the network
|
||||
* DNS requests and responses
|
||||
* Destination IP addresses and ports contacted — but not the public-facing IP address (i.e., the one that your ISP assigns to you)
|
||||
* Scrambled MAC addresses (i.e., those with a salted hash)
|
||||
* Aggregate traffic statistics, i.e., the number of bytes sent and received over a period of time
|
||||
* The names of devices on the identified network
|
||||
|
||||
|
||||
|
||||
By collecting the above types of data, there are some risks involved, such as:
|
||||
|
||||
* Performance degradation
|
||||
* Data breaches
|
||||
* Best-effort support
|
||||
|
||||
|
||||
|
||||
![Figure 3: OWASP IoT][5]
|
||||
|
||||
_**How the security validation is done:**_ Princeton releases its findings in a journal/conference publication. When consumers are unsure about whether to buy a new IoT device or not, they can read the relevant papers before making a decision, checking if the device of interest features in the Princeton data. Otherwise, the consumer can always buy the product, analyse it with IoT Inspector, and return it if the results are unsatisfactory.
|
||||
|
||||
**Open Web Application Security Project (OWASP) set of standards**
|
||||
OWASP is an open community dedicated to enabling organisations to conceive, develop, acquire, operate and maintain applications that can be trusted.
|
||||
|
||||
_**Testing an IoT device for poor authentication/authorisation (OWASP I2):**_ When we think of weak authentication, we might think of passwords that are not changed on a regular basis, six-to-eight character passwords that are nonetheless easy to guess, or of systems without multi-factor authentication mechanisms. Unfortunately, with many smart devices, weak authentication causes major havoc.
|
||||
Many of the IoT devices are secured with default passwords like ‘1234’, ‘password’, or ‘ABCD’. Users put their password checks in client-side Java code, send credentials without using HTTPS or other encrypted transport protocols, or require no passwords at all. This kind of mismanagement of passwords causes a lot of damage to devices.
|
||||
Many OWASP l2 to I10 standards provide different levels of security, which are listed in Figure 3.
|
||||
|
||||
* I1 – Insecure Web interface
|
||||
* I2 – Insufficient authentication/authorisation
|
||||
* I3 – Insecure network services
|
||||
* I4 – Lack of transport encryption
|
||||
* I5 – Privacy concerns
|
||||
* I6 – Insecure cloud interface
|
||||
* I7 – Insecure mobile interface
|
||||
* I8 – Insufficient security configurability
|
||||
* I9 – Insecure software/firmware
|
||||
* I10 – Poor physical security
|
||||
|
||||
|
||||
|
||||
**Mainflux platform: For authentication and authorisation**
|
||||
Mainflux is an open source IoT platform providing features like edge computing and consulting services. Mainflux Labs is a technology company offering an end-to-end, open source patent-free IoT platform, an LF EdgeX Foundry compliant IoT edge gateway with an interoperable ecosystem of plug-and-play components, and consulting services for the software and hardware layers of the IoT technology. It provides enhanced and fine-grained security via the deployment-ready Mainflux authentication and authorisation server, with an access control scheme based on customisable API keys and scoped JWT. It also offers mutual TLS (mTLS) authentication using X.509 certificates, NGINX reverse proxy for security, load balancing and termination of TLS and DTLS connections, etc. Many of these features can be explored and used according to the need of the hour.
|
||||
|
||||
**Best practices for building a secure IoT framework**
|
||||
To prevent/avoid attacks on any IoT device, environment or ecosystem, the following best practices need to be applied:
|
||||
|
||||
* Always use strong passwords for device accounts and Wi-Fi networks.
|
||||
* It is a best practice to always change default passwords.
|
||||
* Use stronger and most recent encryption methods when setting up Wi-Fi networks such as WPA2.
|
||||
* Develop the habit of disabling or protecting the remote access to IoT devices when not needed.
|
||||
* Use wired connections instead of wireless, where possible.
|
||||
* Be careful when buying used IoT devices, as they could have been tampered with. It is better to consult a genuine authority and confirm the device’s validation or buy from a certified authority.
|
||||
* Research the vendor’s device security measures as well as the features that they support.
|
||||
* Modify the privacy and security settings of the device to meet your needs immediately after buying the device.
|
||||
* It is better to disable features that are not used frequently.
|
||||
* Install updates regularly, when they become available. It is a best practice to use the latest firmware updates.
|
||||
* Ensure that an outage due to jamming or a network failure does not result in an insecure state of the installation.
|
||||
* Verify if the smart features are required or if a normal device suffices for the purpose.
|
||||
|
||||
|
||||
|
||||
**Best practices for designers of IoT frameworks and device manufacturers**
|
||||
|
||||
* Always use SSL/TLS-encrypted connections for communication purposes.
|
||||
* Check the SSL certificate and the certificate revocation list.
|
||||
* Allow and encourage the use of strong passwords and change default passwords immediately.
|
||||
* Provide a simple and secure update process with a chain of trust.
|
||||
* Provide a standalone option that works without Internet and cloud connections.
|
||||
* Prevent brute-force attacks at the login stage through account lockout measures or with multi-factor types of authentication mechanisms.
|
||||
* Implement a smart fail-safe mechanism when the connection or power is lost or jammed.
|
||||
* Remove unused tools and allow only trusted applications and software.
|
||||
* Where applicable, security analytics features should be provided in the device management strategy.
|
||||
|
||||
|
||||
|
||||
IoT developers and designers should include security at the start of the device development process, irrespective of whether the device is for the consumer market, the enterprise or industry. Incorporating security at the design phase always helps. Enabling security by default is very critical, as is providing the most recent operating systems and using secure hardware with the latest firmware versions.
|
||||
|
||||
**Enabling PKI and digital certificates**
|
||||
Public key infrastructure (PKI) and 509 digital certificates play important and critical roles in the development of secure IoT devices. It is always a best practice to provide the trust and control needed to distribute and identify public encryption keys, secure data exchanges over networks and verify the identity.
|
||||
|
||||
**API (application performance indicator) security**
|
||||
For any IoT environment, API security is essential to protect the integrity of data. As this data is being sent from IoT devices to back-end systems, we always have to make sure only authorised devices, developers and apps communicate with these APIs.
|
||||
|
||||
**Patch management/continuous software updates**
|
||||
This is one crucial aspect in IoT security management. Providing the means of updating devices and software either over network connections or through automation is critical. Having a coordinated disclosure of vulnerabilities is also important to updating devices as soon as possible. Consider end-of-life strategies as well.
|
||||
|
||||
Always remember that hard coded credentials should never be used nor be part of the design process. If there are any default credentials, users should immediately update them using strong passwords as described earlier, or follow multi-factor or biometric authentication mechanisms.
|
||||
|
||||
**Hardware security**
|
||||
It is absolutely essential to make devices tamper-proof or tamper-evident, and this can be achieved by endpoint hardening.
|
||||
|
||||
Strong encryption is critical to securing communication between devices. It is always a best practice to encrypt data at rest and in transit using cryptographic algorithms.
|
||||
|
||||
IoT and operating system security are new to many security teams. It is critical to keep security staff up to date with new or unknown systems, enabling them to learn new architectures and programming languages to be ready for new security challenges. C-level and cyber security teams should receive regular training to keep up with modern threats and security measures.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensourceforu.com/2019/10/the-role-of-open-source-tools-and-concepts-in-iot-security/
|
||||
|
||||
作者:[Shashidhar Soppin][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://opensourceforu.com/author/shashidhar-soppin/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/10/Security-of-IoT-devices.jpg?resize=696%2C550&ssl=1 (Security of IoT devices)
|
||||
[2]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/10/Security-of-IoT-devices.jpg?fit=900%2C711&ssl=1
|
||||
[3]: https://i2.wp.com/opensourceforu.com/wp-content/uploads/2019/10/Figure-1-The-Mirai-botnet.jpg?resize=350%2C188&ssl=1
|
||||
[4]: https://i2.wp.com/opensourceforu.com/wp-content/uploads/2019/10/Figure-2-Princeton-IoT-Icon.jpg?resize=350%2C329&ssl=1
|
||||
[5]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/10/Figure-3-OWASP-IoT.jpg?resize=350%2C147&ssl=1
|
@ -0,0 +1,148 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (A Primer on Open Source IoT Middleware for the Integration of Enterprise Applications)
|
||||
[#]: via: (https://opensourceforu.com/2019/10/a-primer-on-open-source-iot-middleware-for-the-integration-of-enterprise-applications/)
|
||||
[#]: author: (Gopala Krishna Behara https://opensourceforu.com/author/gopalakrishna-behara/)
|
||||
|
||||
A Primer on Open Source IoT Middleware for the Integration of Enterprise Applications
|
||||
======
|
||||
|
||||
[![][1]][2]
|
||||
|
||||
_The Internet of Things (IoT) integrates a virtual world of information to the real world of devices through a layered architecture. IoT middleware is an interface between the physical world (hardware layer) of devices with the virtual world (application layer), which is responsible for interacting with devices and information management systems. This article discusses IoT middleware, the characteristics of open source IoT middleware, IoT middleware platform architecture and key open source IoT middleware platforms._
|
||||
|
||||
With billions of devices generating trillions of bytes of data, there is a need for heterogeneous IoT device management and application enablement. This requires a revamp of existing architectures. There is a need to identify industry agnostic application middleware to address the complexity of IoT solutions, future changes, the integration of IoT with mobile devices, various types of machinery, equipment and tablets, among other devices.
|
||||
|
||||
According to Statista, the total installed base of IoT connected devices is projected to be 75.44 billion worldwide by 2025.
|
||||
|
||||
Most of the IoT applications are heterogeneous, and domain specific. Deciding on the appropriate IoT middleware for app development is the major challenge faced by developers today. The functionalities provided by different middleware vendors are almost similar but differ mainly in their underlying technologies. Middleware services provided by different IoT vendors include data acquisition, device management, data storage, security and analytics. Selecting the right middleware platform is one of the critical steps in application development.
|
||||
|
||||
The important parameters for choosing the right middleware for an IoT application are scalability, availability, the ability to handle huge amounts of data, a high processing speed, flexibility, integration with varied analytical tools, security and cost.
|
||||
|
||||
**Industry adoption of open source middleware in IoT**
|
||||
The market for IoT middleware was valued at US$ 6.44 billion in 2018 and is expected to reach a value of US$ 18.68 billion by 2024 at a CAGR of 19.72 per cent, over the forecast period 2019-2024 (_<https://www.mordorintelligence.com/industry-reports/iot-middle-ware-market>_).
|
||||
|
||||
According to an Ericsson forecast (_<https://www.ericsson.com/en/mobility-report/internet-of-things-forecast>_), there will be around 29 billion connected devices in use by 2022, of which around 18 billion will be related to IoT. Gartner forecasts that 14.2 billion connected things will be in use in 2019, and that the total will reach 25 billion by 2021, producing immense volume of data.
|
||||
|
||||
**IoT middleware and its features**
|
||||
Middleware acts as an agent between the service providers (IoT devices) and service consumers (enterprise applications). It is a software layer that sits in between applications and objects. It is a mediator interface that enables the interaction between the Internet and ‘things’. It hides the heterogeneity among the devices, components and technology of an IoT system. Middleware provides solutions to frequently encountered problems, such as interoperability, security and dependability. The following are the important features of middleware, which improve the performance of devices.
|
||||
|
||||
**Flexibility:** This feature helps in establishing better connectivity, which improves the communication between applications and things. There are different kinds of flexibility (e.g., response time, faster to evolve and change).
|
||||
|
||||
**Transparency:** Middleware hides many complexities and architectural information details from both the application and the object sides, so that the two can communicate with minimum knowledge of either side.
|
||||
|
||||
**Interoperability:** This functionality allows two sets of applications on interconnected networks to exchange data and services meaningfully with different assumptions on protocols, data models, and configurations.
|
||||
|
||||
**Platform portability:** An IoT platform should be able to communicate from everywhere, anytime with any device. Middleware runs on the user side and can provide independence from network protocols, programming languages, OSs and others.
|
||||
|
||||
**Re-usability:** This feature makes designing and developing easier by modifying system components and assets for specific requirements, which results in cost efficiency.
|
||||
|
||||
**Maintainability:** Maintainability has a fault tolerance approximation. Middleware performs maintainability efficiently and extends the network.
|
||||
|
||||
**Security:** Middleware should provide different security measures for ubiquitous applications and pervasive environments. Authentication, authorisation and access control helps in verification and accountability.
|
||||
|
||||
**Characteristics of open source IoT middleware**
|
||||
An open source IoT middleware platform should be fault-tolerant and highly available. It has the following characteristics:
|
||||
|
||||
* No vendor lock-in, and it comes with the surety of seamless integration of enterprise-wide tools, applications, products and systems developed and deployed by different organisations and vendors.
|
||||
* Open source middleware increases the productivity, speeds up time to market, reduces risk and increases quality.
|
||||
* Adoption of open source middleware enhances the interoperability with other enterprise applications because of the ability to reuse recommended software stacks, libraries and components.
|
||||
* IoT middleware platforms should support open APIs, deployment models of the cloud, and be highly available.
|
||||
* It should support open data formats like RestAPI, JSON, XML and Java, and be freely available
|
||||
* An IoT middleware platform should support multi-service and heterogeneous devices, and be compatible with the hardware for sensing environmental information.
|
||||
* Migration to any new platform or system should be seamless. It should be possible to adopt or integrate with any solution.
|
||||
* The information data model should be distributed and extensible, providing availability and scalability to the system.
|
||||
* An IoT middleware platform should support major communication protocols like MQTT, CoAP, HTTP, WebSockets, etc.
|
||||
* An IoT middleware platform should support different security features like encryption, authentication, authorisation and auditing.
|
||||
* It should support technologies such as M2M applications, real-time analytics, machine learning, artificial intelligence, analytics, visualisation and event reporting.
|
||||
|
||||
|
||||
|
||||
**IoT middleware architecture**
|
||||
The middleware mediates between IoT data producers and the consumers. APIs for interactions with the middleware are based on standard application protocols.
|
||||
|
||||
API endpoints for accessing the data and services should be searchable via an open catalogue, and should contain linked metadata about the resources.
|
||||
|
||||
The device manager communicates messages to the devices. The database needs to access and deliver messages to the devices with minimum latency.
|
||||
|
||||
Data processing involves data translation, aggregation and data filtering on the incoming data, which enables real-time decision making at the edge. The database needs to support high-speed reads and writes with sub-millisecond latency. It helps in performing complex analytical computations on the data.
|
||||
|
||||
The IoT data stream normalises the data to a common format and sends it to enterprise systems. The database needs to perform the data transformation operations efficiently.
|
||||
|
||||
Middleware supports the authentication of users, organisations, applications and devices. It supports functionalities like certificates, password credentials, API keys, tokens, etc. It should also support single sign-on, time based credentials, application authentication (via signatures) and device authentication (via certificates).
|
||||
|
||||
Logging is necessary for both system debugging as well as auditing. Middleware manages the logging of system debugging and auditing details. It helps to track the status of the various services, APIs, etc, and administers them.
|
||||
|
||||
**Key open source IoT middleware platforms**
|
||||
Holistically, an IoT implementation covers data collection and insertion through sensors as well as giving control back to devices. The different types of IoT middleware are categorised as:
|
||||
|
||||
* Application-centric (application and data management)
|
||||
* Platform-centric (application enablement, device management and connectivity management)
|
||||
* Industry-specific (manufacturing, healthcare, energy and utilities, transportation and logistics, agriculture, etc)
|
||||
|
||||
|
||||
|
||||
![Figure 1: IoT middleware architecture][3]
|
||||
|
||||
Selecting the right middleware during various stages of IoT implementation depends on multiple factors like the size of the enterprise, the nature of the business, the development and operational perspectives, etc.The following are some of the top open source middleware platforms for IoT based applications.
|
||||
|
||||
**Kaa** is platform-centric middleware. It manages an unlimited number of connected devices with cross-device interoperability. It performs real-time device monitoring, remote device provisioning and configuration, collection and analysis of sensor data. It has microservices based portability, horizontal scalability and a highly available IoT platform. It supports on premise, public cloud and hybrid models of deployment. Kaa is built on open components like Kafka, Cassandra, MongoDB, Redis, NATS, Spring, React, etc.
|
||||
|
||||
**SiteWhere** is platform-centric middleware. It provides ingestion, storage, processing and integration of device data. It supports multi-tenancy, MQTT, AMQP, Stomp, CoAP and WebSocket. It seamlessly integrates with Android, iOS, and multiple SDKs. It is built on open source technology stacks like MongoDB, Eclipse Californium, InfluxDB, HBase and many others.
|
||||
|
||||
**IoTSyS** is platform-centric and industry-specific middleware. It uses IPv6 for non-IP IoT devices and systems. It is used in smart city and smart grid projects to make the automation infrastructure smart. IoTSyS provides interoperable Web technologies for sensors and actuator networks.
|
||||
|
||||
**DeviceHive** is cloud agnostic, microservices based, platform-centric middleware used for device connectivity and management. It has the ability to connect to any device via MQTT, REST or WebSockets. It supports Big Data solutions like ElasticSearch, Apache Spark, Cassandra and Kafka for real-time and batch processing.
|
||||
|
||||
**EclipseIoT (Kura)** provides device connectivity, data transformation and business logic with intelligent routing, edge processing/analytics and real-time decisions.
|
||||
|
||||
**Zetta** is application-centric middleware. It is a service-oriented open source IoT platform built on Node.js combining REST API, WebSockets and reactive programming. It can run on cloud platforms like Heroku to create geo-distributed networks and stream data into machine analytics systems like Splunk.
|
||||
|
||||
**MainFlux** is application-centric middleware providing solutions based on the cloud. It has been developed as microservices, containerised by Docker and orchestrated with Kubernetes. The architecture is flexible and allows seamless integration with enterprise systems like ERP, BI and CRM. It can also integrate with databases, analytics, backend systems and cloud services easily. In addition, it supports REST, MQTT, WebSocket and CoAP.
|
||||
|
||||
**Distributed Services Architecture (DSA)** facilitates decentralised device inter-communication, allowing protocol translation and data integration to and from third party data sources.
|
||||
|
||||
**OpenRemote** is application-centric middleware used to connect any device regardless of vendor or protocol, to create meaningful connections by converting data points into smart applications. It finds use in home automation, commercial buildings, public space and healthcare. Data visualisation is integrated with devices and sensors, and turns data into smart applications.
|
||||
|
||||
**OpenIoT** is application-centric open source middleware for pulling information from sensors. It incorporates Sensing-as-a-Service for deploying and providing services in cloud environments.
|
||||
|
||||
**ThingsBoard** is an open source IoT platform for data collection, processing, data visualisation and device management. It supports IoT protocols like MQTT, CoA, and HTTP with on-premise and cloud deployment. It is horizontally scalable, stores data in Cassandra DB, HSQLDB and PostgreSQL.
|
||||
|
||||
**NATS.io** is a simple, secure and high performance open source messaging system for cloud native solutions. It is developed as microservices architecture with high performance, secure and resilient capabilities.
|
||||
|
||||
**Benefits of open source IoT middleware**
|
||||
Open source middleware for the IoT has the following advantages over proprietary options:
|
||||
|
||||
* It is easy to upgrade to new technologies with open source middleware.
|
||||
* It has the ability to connect with upcoming device protocols and backend applications.
|
||||
* Open source middleware ensures lower overall software costs, and is easier to use when changing technology and open source APIs for integration.
|
||||
* It has a microservices based architecture and is built using open source technologies, resulting in high performance, scalability and fault-tolerance.
|
||||
* It provides multi-protocol support and is hardware-agnostic. It supports connectivity for any device and any application.
|
||||
* It has the flexibility to allow the cloud service provider to be changed.
|
||||
* It is very important to choose the right set of open source middleware for an IoT solution. This is a big challenge as the market offers a vast choice.
|
||||
|
||||
|
||||
|
||||
Analyse the business problem and arrive at the solution as a first step. Break the solution into services and understand the middleware needs of these services. This will help to narrow down the middleware choices.
|
||||
|
||||
IoT middleware helps overcome the problems associated with the heterogeneity of the entire Internet of Things by enabling smooth communication among devices and components from different vendors and based on different technologies.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensourceforu.com/2019/10/a-primer-on-open-source-iot-middleware-for-the-integration-of-enterprise-applications/
|
||||
|
||||
作者:[Gopala Krishna Behara][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://opensourceforu.com/author/gopalakrishna-behara/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i1.wp.com/opensourceforu.com/wp-content/uploads/2019/10/Middle-were-architecture-illustration.jpg?resize=696%2C426&ssl=1 (Middle were architecture illustration)
|
||||
[2]: https://i1.wp.com/opensourceforu.com/wp-content/uploads/2019/10/Middle-were-architecture-illustration.jpg?fit=800%2C490&ssl=1
|
||||
[3]: https://i1.wp.com/opensourceforu.com/wp-content/uploads/2019/10/Figure-1-IoT-middleware-architecture.jpg?resize=350%2C162&ssl=1
|
160
sources/talk/20191014 Pros and cons of event-driven security.md
Normal file
160
sources/talk/20191014 Pros and cons of event-driven security.md
Normal file
@ -0,0 +1,160 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Pros and cons of event-driven security)
|
||||
[#]: via: (https://opensource.com/article/19/10/event-driven-security)
|
||||
[#]: author: (Yuriy Andamasov https://opensource.com/users/yuriy-andamasov)
|
||||
|
||||
Pros and cons of event-driven security
|
||||
======
|
||||
Event-driven security is not an impenetrable wall, but it may be cheaper
|
||||
and better than what you've been doing to prevent data breaches.
|
||||
![Three closed doors][1]
|
||||
|
||||
Great news, everyone! Forrester Research says that [95% of all recorded breaches][2] in 2016 came from only three industries: government, technology, and retail. Everyone else is safe... ish, right?
|
||||
|
||||
Hold on for a moment. Tech? Retail? What kind of industry diversification is this? We are, after all, living in 2019, where every business is a tech business. And all of us are continuously selling something, whether it’s an innovative product or an amazing service.
|
||||
|
||||
So what the report should have said is that 95% of all recorded breaches came from attacks on 95% of all businesses both online and offline. And some of the attackers went for the .gov.
|
||||
|
||||
More on the matter, [43% of attackers target small businesses][3]—and that’s a lot considering that, on average, a hack attempt takes place every 39 seconds.
|
||||
|
||||
To top things off, the average cost of a data breach in 2020 is expected to exceed [$150 million][4]. These stats sound a bit more terrifying out of context, but the threat is still very much real. Ouch.
|
||||
|
||||
What are our options then?
|
||||
|
||||
Well, either the developers, stakeholders, decision-makers, and business owners willingly risk the integrity and security of their solutions by doing nothing, or they can consider fortifying their digital infrastructure.
|
||||
|
||||
Sure, the dilemma doesn’t seem like it offers too many options, and that’s only because it doesn’t. That said, establishing efficient network security is easier said than done.
|
||||
|
||||
### The cost of safety
|
||||
|
||||
Clearly, security is an expensive endeavor, a luxury even.
|
||||
|
||||
* Cybersecurity costs increased by 22.7% in only a year from 2016 to 2017.
|
||||
* According to Gartner, organizations spent a total of $81.6 billion on cybersecurity, a $17.7 billion increase!
|
||||
* And the worst part yet—the problem doesn’t seem like it’s going away regardless of how much money we throw at it.
|
||||
|
||||
|
||||
|
||||
Perhaps we are doing something wrong? Maybe it’s the way that we perceive network security that’s flawed? Maybe, just maybe, there’s a cheaper AND better solution?
|
||||
|
||||
### Scalability: Bad?
|
||||
|
||||
Software, network, and architecture development have evolved dramatically over the last decade. We’ve moved from the age-old monolithic approach to leaner, more dynamic methodologies that allow faster reactions to the ever-shifting demands of the modern market.
|
||||
|
||||
That said, flexibility comes at a cost. A monolith is a solid, stable element of infrastructure where a small change can crash the whole thing like a house of cards. But said change—regardless of its potential danger—is easily traceable.
|
||||
|
||||
Today, the architecture is mostly service-based, where every single piece of functionality is like a self-contained Lego block. An error in one of the blocks won’t discard the entire system. It may not even affect the blocks standing near it.
|
||||
|
||||
This approach, while adding scalability, has a downside—it’s really hard to trace a single malicious change, especially in an environment where every element is literally bombarded with new data coming anywhere from an HR or security update to, well, a malicious code attack.
|
||||
|
||||
Does this mean it’s best if we sacrifice scalability in favor of security?
|
||||
|
||||
Not at all. We’ve moved away from the monolith for a reason. Going back now will probably cost you your entire project. The tricky part is in effectively identifying what is and what isn’t a threat, as this is where the flaw of microservices lies.
|
||||
|
||||
We need preventive measures.
|
||||
|
||||
### Events, alerts, and incidents
|
||||
|
||||
Everything that happens within your network can be described in one of three words: event, alert, or incident.
|
||||
|
||||
An **event** is any observed change taking place in a network, environment, or workflow. So, for example, when a new firewall policy is pushed, you may consider that the event has happened. When the routers are updated, another event has happened, and so on and so forth.
|
||||
|
||||
An **alert** is an event that requires action. In simpler words, if you or your team need to do something due to the event taking place, it is considered an alert.
|
||||
|
||||
According to the CERT NISTT 800-61 definition, an **incident** is an event that violates your security policies. Or, in simpler words, it is an event that negatively impacts the business like a worm spreading through the network, a phishing attempt, or the loss of sensitive data.
|
||||
|
||||
By this logic, your infrastructure developers, security officers, and net admins are tasked with a very simple mission: establishing efficient preventive measures against any and all incidents.
|
||||
|
||||
Again, easier said than done.
|
||||
|
||||
There are simply too many different events taking place at one time. Every change, shift, or update differs, one from another, resulting in dozens of false-positive incidents. Add the fact that the mischievous events are very keen on disguising themselves, and you’ll get why your net admins look like they’ve lived on coffee and Red Bull for (at least) the past few weeks.
|
||||
|
||||
Is there anything we, as a responsible community of developers, managers, stakeholders, product, and business owners, can do?
|
||||
|
||||
### Event-driven security in a nutshell
|
||||
|
||||
What’s the one thing everything you ignore, act upon, or react to shares in common?
|
||||
|
||||
An event.
|
||||
|
||||
Something needs to happen for you to respond to it in any shape or form. Additionally, many events are similar to one another and can be categorized as a stream.
|
||||
|
||||
Here’s an example.
|
||||
|
||||
Let’s say you have an e-commerce store. One of your clients adds an item to his cart (event) and then removes it (event) or proceeds with the purchase (event).
|
||||
|
||||
Need I say that, other than simply categorizing them, we can analyze these events to identify behavioral patterns, and this makes it easier to identify threats in real time (or even empower HR/dev/marketing teams with additional data)?
|
||||
|
||||
#### Event vs. command
|
||||
|
||||
So event-driven security is essentially based on following up events. Were we ever _not_ following up on them? Didn’t we have commands for that?
|
||||
|
||||
Yes, yes, we have, and that’s partially the problem. Here’s an example of an event versus a command:
|
||||
|
||||
_> Event: I sit on the couch, and the TV turns on._
|
||||
_> Command: I sit on the couch and turn on the TV._
|
||||
|
||||
See the difference? I had to perform an action in the second scenario; in the first, the TV reacted to the event (me sitting on the couch generated the TV turning on) on its own.
|
||||
|
||||
The first approach ensures the integrity of your network through efficient use of automation, essentially allowing the software to operate on its own and decide whether to launch the next season of _Black Mirror_ on Netflix or to quarantine an upcoming threat.
|
||||
|
||||
#### Isolation
|
||||
|
||||
Any event is essentially a trigger that launches the next application in the architecture. A user inputs his login, and the system validates its correctness, requests confirmation from the database, and tests the input for the presence of code.
|
||||
|
||||
So far, so good. Not much has changed, right?
|
||||
|
||||
Here’s the thing—every process and every app run autonomously like separate events, each triggering their own chains. None of the apps know if other apps have been triggered and whether they are running any processes or not.
|
||||
|
||||
Think of them as separate, autonomous clusters. If one is compromised, it will not affect the entirety of the system, as it simply doesn’t know if anything else exists. That said, a malfunction in one of the clusters will trigger an alert, thus preventing the incident.
|
||||
|
||||
#### An added bonus
|
||||
|
||||
Isolated apps are not dependent on one another, meaning you’ll be able to plug in as many of them as you need without any of them risking or affecting the rest of the system.
|
||||
|
||||
Call it scalability out of the box, if you will.
|
||||
|
||||
### Pros of the event-driven approach
|
||||
|
||||
We’ve already discussed most of the pros of the event-driven approach. Let’s summarize them here in the form of short bullet points.
|
||||
|
||||
* **Encapsulation:** Every process has a set of clear, easily executed boundaries.
|
||||
* **Decoupling:** The processes are independent and unaware of one another.
|
||||
* **Scalability:** It’s easy to add new functionality, apps, and processes.
|
||||
* **Data generation:** Event strings generate predictable data patterns you can easily analyze.
|
||||
|
||||
|
||||
|
||||
### Cons of the event-driven approach
|
||||
|
||||
Sadly, despite an impressive array of benefits to the business, event-driven architecture and security are not silver bullets. The approach has its flaws.
|
||||
|
||||
For starters, developing any architecture with an insane level of scalability is hard, expensive, and time-consuming.
|
||||
|
||||
Event-driven security is far from being a truly impenetrable wall. Hackers evolve and adapt rather quickly. They’ll likely find a breach in any system if they put their mind to it, whether through coding or through phishing.
|
||||
|
||||
Luckily, you don’t have to build a Fort Knox. All you need is a solid system that’s hard enough to crack for the hacker to give up and move to an easier target. The event-driven approach to network security does just that.
|
||||
|
||||
Moreover, it minimizes your losses if an incident actually happens, so you have that going for you, which is nice.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/10/event-driven-security
|
||||
|
||||
作者:[Yuriy Andamasov][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/yuriy-andamasov
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/EDU_UnspokenBlockers_1110_A.png?itok=x8A9mqVA (Three closed doors)
|
||||
[2]: https://www.techrepublic.com/article/forrester-what-can-we-learn-from-a-disastrous-year-of-hacks-and-breaches/
|
||||
[3]: https://www.cybintsolutions.com/industries-likely-to-get-hacked/
|
||||
[4]: https://www.cybintsolutions.com/cyber-security-facts-stats/
|
@ -0,0 +1,106 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Beamforming explained: How it makes wireless communication faster)
|
||||
[#]: via: (https://www.networkworld.com/article/3445039/beamforming-explained-how-it-makes-wireless-communication-faster.html)
|
||||
[#]: author: (Josh Fruhlinger https://www.networkworld.com/author/Josh-Fruhlinger/)
|
||||
|
||||
Beamforming explained: How it makes wireless communication faster
|
||||
======
|
||||
Beamforming uses the science of electromagnetic interference to make Wi-Fi and 5G connections more precise.
|
||||
Thinkstock
|
||||
|
||||
Beamforming is a technique that focuses a wireless signal towards a specific receiving device, rather than having the signal spread in all directions from a broadcast antenna, as it normally would. The resulting more direct connection is faster and more reliable than it would be without beamforming.
|
||||
|
||||
Although the principles of beamforming have been known since the 1940s, in recent years beamforming technologies have introduced incremental improvements in Wi-Fi networking. Today, beamforming is crucial to the [5G networks][1] that are just beginning to roll out.
|
||||
|
||||
[5G versus 4G: How speed, latency and application support differ][1]
|
||||
|
||||
### How beamforming works
|
||||
|
||||
A single antenna broadcasting a wireless signal radiates that signal in all directions (unless it's blocked by some physical object). That's the nature of how electromagnetic waves work. But what if you wanted to focus that signal in a specific direction, to form a targeted beam of electromagnetic energy? One technique for doing this involves having multiple antennas in close proximity, all broadcasting the same signal at slightly different times. The overlapping waves will produce interference that in some areas is _constructive_ (it makes the signal stronger) and in other areas is _destructive_ (it makes the signal weaker, or undetectable). If executed correctly, this beamforming process can focus your signal where you want it to go.
|
||||
|
||||
[][2]
|
||||
|
||||
BrandPost Sponsored by HPE
|
||||
|
||||
[Take the Intelligent Route with Consumption-Based Storage][2]
|
||||
|
||||
Combine the agility and economics of HPE storage with HPE GreenLake and run your IT department with efficiency.
|
||||
|
||||
[][3] ojogabonitoo / Getty Images
|
||||
|
||||
The mathematics behind beamforming is very complex (the [Math Encounters blog][4] has an introduction, if you want a taste), but the application of beamforming techniques is not new. Any form of energy that travels in waves, including sound, can benefit from beamforming techniques; they were first developed to [improve sonar during World War II][5] and are [still important to audio engineering][6]. But we're going to limit our discussion here to wireless networking and communications.
|
||||
|
||||
### Beamforming benefits and limitations
|
||||
|
||||
By focusing a signal in a specific direction, beamforming allows you deliver higher signal quality to your receiver — which in practice means faster information transfer and fewer errors — without needing to boost broadcast power. That's basically the holy grail of wireless networking and the goal of most techniques for improving wireless communication. As an added benefit, because you aren't broadcasting your signal in directions where it's not needed, beamforming can reduce interference experienced by people trying to pick up other signals.
|
||||
|
||||
The limitations of beamforming mostly involve the computing resources it requires; there are many scenarios where the time and power resources required by beamforming calculations end up negating its advantages. But continuing improvements in processor power and efficiency have made beamforming techniques affordable enough to build into consumer networking equipment.
|
||||
|
||||
### Wi-Fi beamforming routers: 802.11n vs. 802.11ac
|
||||
|
||||
Beamforming began to appear in routers back in 2008, with the advent of the [802.11n Wi-Fi standard][7]. 802.11n was the first version of Wi-Fi to support multiple-input multiple-output, or MIMO, technology, which beamforming needs in order to send out multiple overlapping signals. Beamforming with 802.11n equipment never really took off, however, because the spec doesn't lay out how beamforming should be implemented. A few vendors put out proprietary implementations that required purchasing matching routers and wireless cards to work, and they were not popular.
|
||||
|
||||
With the emergence of the [802.11ac standard][8] in 2016, that all changed. There's now a set of specified beamforming techniques for Wi-Fi gear, and while 802.11ac routers aren't required by the specification to implement beamforming, if they do (and almost all on the market now do) they do so in a vendor-neutral and interoperable way. While some offerings might tout branded names, such as D-Link's AC Smart Beam, these are all implementations of the same standard. (The even newer [802.11ax standard][9] continues to support ac-style beamforming.)
|
||||
|
||||
### Beamforming and MU-MIMO
|
||||
|
||||
Beamforming is key for the support of multiuser MIMO, or [MU-MIMO][10], which is becoming more popular as 802.11ax routers roll out. As the name implies, MU-MIMO involves multiple users that can each communicate to multiple antennas on the router. MU-MIMO [uses beamforming][11] to make sure communication from the router is efficiently targeted to each connected client.
|
||||
|
||||
### Explicit beamforming vs. implicit beamforming
|
||||
|
||||
There are a couple of ways that Wi-Fi beamforming can work. If both the router and the endpoint support 802.11ac-compliant beamforming, they'll begin their communication session with a little "handshake" that helps both parties establish their respective locations and the channel on which they'll communicate; this improves the quality of the connection and is known as _explicit_ beamforming. But there are still plenty of network cards in use that only support 802.11n or even older versions of Wi-Fi. A beamforming router can still attempt to target these devices, but without help from the endpoint, it won't be able to zero in as precisely. This is known as _implicit_ beamforming, or sometimes as _universal_ beamforming, because it works in theory with any Wi-Fi device.
|
||||
|
||||
In many routers, implicit beamforming is a feature you can turn on and off. Is enabling implicit beamforming worth it? The [Router Guide suggests][12] that you test how your network operates with it on and off to see if you get a boost from it. It's possible that devices such as phones that you carry around your house can see dropped connections with implicit beamforming.
|
||||
|
||||
### 5G beamforming
|
||||
|
||||
To date, local Wi-Fi networks is where the average person is most likely to encounter beamforming in the wild. But with the rollout of wide-area 5G networks now under way, that's about to change. 5G uses radio frequencies between 30 and 300 GHz, which can transmit data much more quickly but are also much more prone to interference and encounter more difficulty passing through physical objects. A host of technologies are required to overcome these problems, including smaller cells, massive MIMO — basically cramming tons of antennas onto 5G base stations — and, yes, [beamforming][13]. If 5G takes off in the way that vendors are counting on, the time will come soon enough when we'll all be using beamforming (behind the scenes) every day.
|
||||
|
||||
**Learn more about wireless networking**
|
||||
|
||||
* [How to determine if Wi-Fi 6 is right for you][14]
|
||||
* [What is 5G? How is it better than 4G?][13]
|
||||
* [Cisco exec details how Wi-Fi 6 and 5G will fire-up enterprises][15]
|
||||
* [Wi-Fi 6 is coming to a router near you][16]
|
||||
* [Wi-Fi analytics get real][17]
|
||||
|
||||
|
||||
|
||||
Join the Network World communities on [Facebook][18] and [LinkedIn][19] to comment on topics that are top of mind.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3445039/beamforming-explained-how-it-makes-wireless-communication-faster.html
|
||||
|
||||
作者:[Josh Fruhlinger][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.networkworld.com/author/Josh-Fruhlinger/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.networkworld.com/article/3330603/5g-versus-4g-how-speed-latency-and-application-support-differ.html
|
||||
[2]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE20773&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage)
|
||||
[3]: https://images.idgesg.net/images/article/2019/10/nw_wifi_router_traditional-and-beamformer_foundational_networking_internet-100814037-orig.jpg
|
||||
[4]: https://www.mathscinotes.com/2012/01/beamforming-math/
|
||||
[5]: https://apps.dtic.mil/dtic/tr/fulltext/u2/a250189.pdf
|
||||
[6]: https://www.mathworks.com/company/newsletters/articles/making-all-the-right-noises-shaping-sound-with-audio-beamforming.html
|
||||
[7]: https://www.networkworld.com/article/2270718/the-role-of-beam-forming-in-11n.html
|
||||
[8]: https://www.networkworld.com/article/3067702/mu-mimo-makes-wi-fi-better.html
|
||||
[9]: https://www.networkworld.com/article/3258807/what-is-802-11ax-wi-fi-and-what-will-it-mean-for-802-11ac.html
|
||||
[10]: https://www.networkworld.com/article/3250268/what-is-mu-mimo-and-why-you-need-it-in-your-wireless-routers.html
|
||||
[11]: https://www.networkworld.com/article/3256905/13-things-you-need-to-know-about-mu-mimo-wi-fi.html
|
||||
[12]: https://routerguide.net/enable-beamforming-on-or-off/
|
||||
[13]: https://www.networkworld.com/article/3203489/what-is-5g-how-is-it-better-than-4g.html
|
||||
[14]: https://www.networkworld.com/article/3356838/how-to-determine-if-wi-fi-6-is-right-for-you.html
|
||||
[15]: https://www.networkworld.com/article/3342158/cisco-exec-details-how-wi-fi-6-and-5g-will-fire-up-enterprises-in-2019-and-beyond.html
|
||||
[16]: https://www.networkworld.com/article/3311921/mobile-wireless/wi-fi-6-is-coming-to-a-router-near-you.html
|
||||
[17]: https://www.networkworld.com/article/3305583/wi-fi/wi-fi-analytics-get-real.html
|
||||
[18]: https://www.facebook.com/NetworkWorld/
|
||||
[19]: https://www.linkedin.com/company/network-world
|
60
sources/talk/20191015 How GNOME uses Git.md
Normal file
60
sources/talk/20191015 How GNOME uses Git.md
Normal file
@ -0,0 +1,60 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How GNOME uses Git)
|
||||
[#]: via: (https://opensource.com/article/19/10/how-gnome-uses-git)
|
||||
[#]: author: (Molly de Blanc https://opensource.com/users/mollydb)
|
||||
|
||||
How GNOME uses Git
|
||||
======
|
||||
The GNOME project's decision to centralize on GitLab is creating
|
||||
benefits across the community—even beyond the developers.
|
||||
![red panda][1]
|
||||
|
||||
“What’s your GitLab?” is one of the first questions I was asked on my first day working for the [GNOME Foundation][2]—the nonprofit that supports GNOME projects, including the [desktop environment][3], [GTK][4], and [GStreamer][5]. The person was referring to my username on [GNOME’s GitLab instance][6]. In my time with GNOME, I’ve been asked for my GitLab a lot.
|
||||
|
||||
We use GitLab for basically everything. In a typical day, I get several issues and reference bug reports, and I occasionally need to modify a file. I don’t do this in the capacity of being a developer or a sysadmin. I’m involved with the Engagement and Inclusion & Diversity (I&D) teams. I write newsletters for Friends of GNOME and interview contributors to the project. I work on sponsorships for GNOME events. I don’t write code, and I use GitLab every day.
|
||||
|
||||
The GNOME project has been managed a lot of ways over the past two decades. Different parts of the project used different systems to track changes to code, collaborate, and share information both as a project and as a social space. However, the project made the decision that it needed to become more integrated and it took about a year from conception to completion.
|
||||
|
||||
There were a number of reasons GNOME wanted to switch to a single tool for use across the community. External projects touch GNOME, and providing them an easier way to interact with resources was important for the project, both to support the community and to grow the ecosystem. We also wanted to better track metrics for GNOME—the number of contributors, the type and number of contributions, and the developmental progress of different parts of the project.
|
||||
|
||||
When it came time to pick a collaboration tool, we considered what we needed. One of the most important requirements was that it must be hosted by the GNOME community; being hosted by a third party didn’t feel like an option, so that discounted services like GitHub and Atlassian. And, of course, it had to be free software. It quickly became obvious that the only real contender was GitLab. We wanted to make sure contribution would be easy. GitLab has features like single sign-on, which allows people to use GitHub, Google, GitLab.com, and GNOME accounts.
|
||||
|
||||
We agreed that GitLab was the way to go, and we began to migrate from many tools to a single tool. GNOME board member [Carlos Soriano][7] led the charge. With lots of support from GitLab and the GNOME community, we completed the process in May 2018.
|
||||
|
||||
There was a lot of hope that moving to GitLab would help grow the community and make contributing easier. Because GNOME previously used so many different tools, including Bugzilla and CGit, it’s hard to quantitatively measure how the switch has impacted the number of contributions. We can more clearly track some statistics though, such as the nearly 10,000 issues closed and 7,085 merge requests merged between June and November 2018. People feel that the community has grown and become more welcoming and that contribution is, in fact, easier.
|
||||
|
||||
People come to free software from all sorts of different starting points, and it’s important to try to even out the playing field by providing better resources and extra support for people who need them. Git, as a tool, is widely used, and more people are coming to participate in free software with those skills ready to go. Self-hosting GitLab provides the perfect opportunity to combine the familiarity of Git with the feature-rich, user-friendly environment provided by GitLab.
|
||||
|
||||
It’s been a little over a year, and the change is really noticeable. Continuous integration (CI) has been a huge benefit for development, and it has been completely integrated into nearly every part of GNOME. Teams that aren’t doing code development have also switched to using the GitLab ecosystem for their work. Whether it’s using issue tracking to manage assigned tasks or version control to share and manage assets, even teams like Engagement and I&D have taken up using GitLab.
|
||||
|
||||
It can be hard for a community, even one developing free software, to adapt to a new technology or tool. It is especially hard in a case like GNOME, a project that [recently turned 22][8]. After more than two decades of building a project like GNOME, with so many parts used by so many people and organizations, the migration was an endeavor that was only possible thanks to the hard work of the GNOME community and generous assistance from GitLab.
|
||||
|
||||
I find a lot of convenience in working for a project that uses Git for version control. It’s a system that feels comfortable and is familiar—it’s a tool that is consistent across workplaces and hobby projects. As a new member of the GNOME community, it was great to be able to jump in and just use GitLab. As a community builder, it’s inspiring to see the results: more associated projects coming on board and entering the ecosystem; new contributors and community members making their first contributions to the project; and increased ability to measure the work we’re doing to know it’s effective and successful.
|
||||
|
||||
It’s great that so many teams doing completely different things (such as what they’re working on and what skills they’re using) agree to centralize on any tool—especially one that is considered a standard across open source. As a contributor to GNOME, I really appreciate that we’re using GitLab.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/10/how-gnome-uses-git
|
||||
|
||||
作者:[Molly de Blanc][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/mollydb
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/redpanda_firefox_pet_animal.jpg?itok=aSpKsyna (red panda)
|
||||
[2]: https://www.gnome.org/foundation/
|
||||
[3]: https://gnome.org/
|
||||
[4]: https://www.gtk.org/
|
||||
[5]: https://gstreamer.freedesktop.org/
|
||||
[6]: https://gitlab.gnome.org/
|
||||
[7]: https://twitter.com/csoriano1618?lang=en
|
||||
[8]: https://opensource.com/article/19/8/poll-favorite-gnome-version
|
@ -0,0 +1,93 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (The Emergence of Edge Analytics in the IoT Ecosystem)
|
||||
[#]: via: (https://opensourceforu.com/2019/10/the-emergence-of-edge-analytics-in-the-iot-ecosystem/)
|
||||
[#]: author: (Shashidhar Soppin https://opensourceforu.com/author/shashidhar-soppin/)
|
||||
|
||||
The Emergence of Edge Analytics in the IoT Ecosystem
|
||||
======
|
||||
|
||||
[![][1]][2]
|
||||
|
||||
_Edge analytics involves processing, collecting and analysing data near its source so that not all of it is sent to the cloud. This is crucial when massive volumes of data are generated by numerous devices. It saves a lot of time and reduces latency._
|
||||
|
||||
The exponential proliferation of IoT devices and IoT based platforms is leading to multiple complex scenarios. Such sudden growth and scalability need a lot of analytics to be done for better predictions and choices. IoT analytics will become more complex and challenging when the number of IoT devices grows even further. A good analytics system will become crucial for any IoT environment to succeed and be more robust.
|
||||
|
||||
Making any sense out of IoT data needs good and efficient analytics. This may not always be Big Data (volume, velocity and variety of data). There are many other categories of analytics, like simple past event review, or more advanced analytics using historical data to make predictions about outcomes, etc.
|
||||
|
||||
**What is analytics?**
|
||||
Analytics (for IoT) is the science and art of trying to find matching patterns in the huge quantity of data (it could be Big Data, or otherwise) generated by connected and smart devices. In layman’s terms, this can be defined as simply as monitoring trends and finding any abnormalities.
|
||||
|
||||
Listed below are some of the well-known analytics methodologies or types:
|
||||
|
||||
* Descriptive analytics tells us what is happening
|
||||
* Diagnostics analytics tells us why it happened
|
||||
* Predictive analytics tells us what is likely to happen
|
||||
* Prescriptive analytics tells us what should be done to prevent something from happening
|
||||
|
||||
|
||||
|
||||
Today, there are various tools and technologies available for analytics. Many of the enterprises now expect to have intelligence or analytics sit on the platform itself for better monitoring and live streaming capabilities. Processing historical data from the cloud or any other outside means takes time and adds latency to the entire response time. Analytics using microservices based technologies is also one trend observed recently.
|
||||
|
||||
Each of the existing IoT solutions may not need analytics to be done. Listed below are some types of analytics that can be performed:
|
||||
|
||||
* Generating basic reports
|
||||
* Real-time stream analytics
|
||||
* Long-term data analytics
|
||||
* Large-scale data analytics
|
||||
* Advanced data analytics
|
||||
|
||||
|
||||
|
||||
Once the data is acquired from any selected source, it has to be pre-processed to identify missing values and for the purpose of scaling the data. Once the pre-processing is done,‘feature extraction’ needs to be carried out. From feature extraction, we can identify any significant information that helps in improving subsequent steps.
|
||||
|
||||
**Basic analysis**
|
||||
This analysis typically involves Big Data and will, most of the time, involve descriptive and diagnostic kinds of analytics.
|
||||
|
||||
This is the era of edge analytics. Many of the industries that work on IoT based solutions and frameworks use it, and it is expected to become ‘the next big thing’ in the coming days. At present, there are many tools and technologies that deal with edge analytics.
|
||||
|
||||
**Edge analytics and the IoT tools**
|
||||
This is an analysis done at the source, by processing, collecting and analysing the data instead of sending it to the cloud or server for processing and analysis. This saves a lot of time and avoids latency. By using edge analytics, most problems in today’s world can be solved.
|
||||
|
||||
According to Gartner’s predictions, by 2020, more than half the major new business processes and systems will incorporate some element of IoT. Analytics will become one of the key aspects of any of these IoT systems/sub-systems. It will support the decision-making process in related operations and help in business transformation.
|
||||
A brief introduction of some of the well-known open source IoT tools for edge analytics follows.
|
||||
|
||||
**EdgeX Foundry:** This is an open source project that is hosted by the Linux Foundation. It provides interoperability, can be hosted within the hardware and is an OS-agnostic software platform. The EdgeX ecosystem can be used as plug-and-play with support for multiple components, and this can be easily deployed as an IoT solution with edge analytics. EdgeX Foundry can be deployed using microservices as well.
|
||||
|
||||
**Website:** _<https://github.com/edgexfoundry/edgex-go>_
|
||||
|
||||
**Eclipse Kura:** Eclipse Kura is one more popular open source IoT edge framework. It is based on Java/OSGi and offers API based access to the underlying hardware interface of IoT gateways (for serial ports, watchdog, GPS, I2C, etc). The Kura architecture can be found at _<http://eclipse.github.io/kura/intro/intro.html>_.
|
||||
|
||||
Kura components are designed as configurable OSGi based and declarative services, which are exposed service APIs. Most of the Kura components are purely Java based, while others can be invoked through JNI, and generally have a dependency on the Linux operating system.
|
||||
|
||||
**Eclipse Kapua:** Eclipse Kapua is a modular IoT cloud platform that is mainly used to manage and integrate devices and their data. Kapua comes loaded with the following features.
|
||||
|
||||
* **Connect:** Many of the IoT devices can be connected to Kapua using MQTT and other protocols.
|
||||
* **Manage:** The management of a device’s applications, configurations and resources can be easily done.
|
||||
* **Store and analyse:** Kapua helps in storing and indexing the data published by IoT devices for quick and easy analysis, and later visualisation in the dashboard.
|
||||
* **Integrate:** Kapua services can be easily integrated with various IT applications through flexible message routing and ReST based APIs.
|
||||
|
||||
|
||||
|
||||
**Website:** _<https://www.eclipse.org/kapua/>_
|
||||
|
||||
As mentioned earlier and based on Gartner analysis, edge analytics will become one of the leading tech trends in the coming months. The more analysis that is done at the edge, the more sophisticated and advanced the whole IoT ecosystem will become. There will come a day where M2M communication may happen independently, without much human intervention.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensourceforu.com/2019/10/the-emergence-of-edge-analytics-in-the-iot-ecosystem/
|
||||
|
||||
作者:[Shashidhar Soppin][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://opensourceforu.com/author/shashidhar-soppin/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i1.wp.com/opensourceforu.com/wp-content/uploads/2019/10/Graph-Analytics-1.jpg?resize=696%2C464&ssl=1 (Graph Analytics)
|
||||
[2]: https://i1.wp.com/opensourceforu.com/wp-content/uploads/2019/10/Graph-Analytics-1.jpg?fit=800%2C533&ssl=1
|
@ -0,0 +1,102 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (The software-defined data center drives agility)
|
||||
[#]: via: (https://www.networkworld.com/article/3446040/the-software-defined-data-center-drives-agility.html)
|
||||
[#]: author: (Matt Conran https://www.networkworld.com/author/Matt-Conran/)
|
||||
|
||||
The software-defined data center drives agility
|
||||
======
|
||||
The value of SDN is doing as much as possible in the software so you don’t depend on the delivery of new features to come from a new generation of the hardware.
|
||||
monsitj / Getty Images
|
||||
|
||||
In this day and age, demands on networks are coming from a variety of sources, internal end-users, external customers and via changes in the application architecture. Such demands put pressure on traditional architectures.
|
||||
|
||||
To deal effectively with these demands requires the network domain to become more dynamic. For this, we must embrace digital transformation. However, current methods are delaying this much-needed transition. One major pain point that networks suffer from is the necessity to dispense with manual working, which lacks fabric wide automation. This must be addressed if organizations are to implement new products and services ahead of the competition.
|
||||
|
||||
So, to evolve, to be in line with the current times and use technology as an effective tool, one must drive the entire organization to become a digital enterprise. The network components do play a key role, but the digital transformation process is an enterprise-wide initiative.
|
||||
|
||||
[][1]
|
||||
|
||||
BrandPost Sponsored by HPE
|
||||
|
||||
[Take the Intelligent Route with Consumption-Based Storage][1]
|
||||
|
||||
Combine the agility and economics of HPE storage with HPE GreenLake and run your IT department with efficiency.
|
||||
|
||||
### Digital transformation and network visibility
|
||||
|
||||
As a part of this transformation, the network is no longer considered a black box. Now the network is a source for deep visibility that can aid a large set of use cases like network performance, monitoring, security and capacity planning, to name a few. However, in spite of such critical importance visibility is often overlooked.
|
||||
|
||||
We need the ability to provide deep visibility for the application at a flow level. Rationally, today if you want anything comparable, you would deploy a redundant monitoring network. Such a network would consist of probes, packet brokers and various tools to process the packet for metadata.
|
||||
|
||||
A more viable solution would integrate the network visibility into the fabric and therefore would not need a bunch of components. This enables us to do more with the data and aids with agility for ongoing network operations. There will always be some kind of requirement for application optimization or a security breach. And this is where visibility can help you iron out such issues quickly.
|
||||
|
||||
### Gaining agility with SDN
|
||||
|
||||
When increasing agility, what is useful is the building of a complete network overlay. An overlay is a solution that is abstracted from the underlying physical infrastructure in a certain way.
|
||||
|
||||
**[ Related: [MPLS explained – What you need to know about multi-protocol label switching][2]**
|
||||
|
||||
What this means is that we are separating and disaggregating the customer applications or services from the network infrastructure. This is more like a sandbox or private network for each application that is on an existing network. This way we are empowered with both the SDN controller and controllerless options. Both [data center architectures][3] _[Disclaimer: The author is employed by Network Insight]_ have their advantages and disadvantages.
|
||||
|
||||
Traditionally, the deployment of an application to the network involves propagating the policy to work through the entire infrastructure. Why? Because the network simply acts as an underlay and the segmentation rules configured on this underlay are needed to separate different applications and services. This, ultimately, creates a very rigid architecture that is unable to react quickly and adapt to the changes, therefore lacking agility. In essence, the applications and the physical network are tightly coupled.
|
||||
|
||||
[Virtual networks][4] are mostly built from either the servers or ToR switches. Either way, the underlying network transports the traffic and doesn’t need to be configured to accommodate the customer application. That is all carried in the overlay. By and large, everything happens in the overlay network which is most efficient when done in a fully distributed manner.
|
||||
|
||||
Now the application and service deployment occur without touching the network. Once the tight coupling between the application and network is removed, increased agility and simplicity of deploying applications and services are created.
|
||||
|
||||
### Where do your features live?
|
||||
|
||||
Some vendors build into the hardware the differentiator of the offering. With different hardware, you can accelerate the services. With this design, the hardware level is manipulated, but it does not use the standard Open Networking protocols. The result is that you are 100% locked, unable to move as the cost of moving is too much.
|
||||
|
||||
You could have numerous generations: for example, line cards, all the line cards have different capabilities, resulting in a complex feature matrix. When the Cisco Nexus platform first came out, I was onsite as a TDA trying to bring in some redundancy into the edge/access layer.
|
||||
|
||||
When the virtual PortChannel (vPC) came out they were several topologies and some of these topologies were only available on certain hardware. As it’s just a topology, it would have been useful to have it across all line cards. This is the world of closed networking, which has been accepted as the norm until now.
|
||||
|
||||
### Open networking
|
||||
|
||||
Traditionally, networking products were a combination of the hardware and software that had to be purchased together as an integrated solution. Open Networking, on the other hand, is the disaggregation of hardware from the software. This basically allows IT to mix and match at will.
|
||||
|
||||
With Open Networking, you are not reinventing the way packets are forwarded, or the way routers communicate with each other. Why? Because, with Open Networking, you are never alone and never the only vendor. You need to adapt and fit, and for this, you need to use open protocols.
|
||||
|
||||
The value of SDN is doing as much as possible in the software so you don’t depend on the delivery of new features to come from a new generation of the hardware. You want to put as much intelligence as possible into the software, thus removing the intelligence from the physical layer.
|
||||
|
||||
You don’t want to build the hardware features; instead, you want to use the software to provide the new features. This is an important philosophy and is the essence of Open Networking. From the customer's point of view, they get more agility as they can move from generation to generation of services without having hardware dependency. They don’t have to incur the operational costs of swapping out the hardware constantly.
|
||||
|
||||
### First steps
|
||||
|
||||
It is agreed that agility is a necessity. So, what is the prime step? One of the key steps is to create a software-defined data center that will allow the rapid deployment of compute and storage for the workloads. In addition to software-defined compute and storage, the network must be automated and not be an impediment.
|
||||
|
||||
Many organizations assume that to achieve agility, we must move everything to the cloud. Migrating workloads to the cloud indeed allow organizations to be competitive and equipped with the capabilities of a much larger organization.
|
||||
|
||||
Only a small proportion can adopt a fully cloud-native design. More often than not, there will always be some kind of application that needs to stay on-premise. In this case, the agility in the cloud needs to be matched by the on-premise infrastructure. This requires the virtualization of the on-premise compute, storage and network components.
|
||||
|
||||
Compute and storage, affordable software control, and virtualization have progressed dramatically. However, the network can cause a lag. Solutions do exist but they are complex, expensive and return on investment (ROI) is a stretch. Therefore, such solutions are workable only for the largest enterprises. This creates a challenge for mid-sized businesses that want to virtualize the network components.
|
||||
|
||||
**This article is published as part of the IDG Contributor Network. [Want to Join?][5]**
|
||||
|
||||
Join the Network World communities on [Facebook][6] and [LinkedIn][7] to comment on topics that are top of mind.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3446040/the-software-defined-data-center-drives-agility.html
|
||||
|
||||
作者:[Matt Conran][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.networkworld.com/author/Matt-Conran/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE20773&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage)
|
||||
[2]: https://www.networkworld.com/article/2297171/sd-wan/network-security-mpls-explained.html
|
||||
[3]: https://network-insight.net/2014/08/data-center-topologies/
|
||||
[4]: https://youtu.be/-Yjk0GiysLI
|
||||
[5]: https://www.networkworld.com/contributor-network/signup.html
|
||||
[6]: https://www.facebook.com/NetworkWorld/
|
||||
[7]: https://www.linkedin.com/company/network-world
|
@ -0,0 +1,135 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Drupal shows leadership on diversity and inclusion)
|
||||
[#]: via: (https://opensource.com/article/19/10/drupals-diversity-initiatives)
|
||||
[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo)
|
||||
|
||||
Drupal shows leadership on diversity and inclusion
|
||||
======
|
||||
Drupal's Diversity & Inclusion Group is taking an innovative approach to
|
||||
bringing attention to underrepresented groups in open source.
|
||||
![Two diverse hands holding a globe][1]
|
||||
|
||||
I didn't expect [DrupalCon Seattle][2]'s opening keynote to address the barriers that hold people back from making open source contributions. So imagine my surprise when Dries Buytaert, Drupal's project lead and co-founder and CTO of Acquia, which created Drupal, [used his time onstage][3] to share an apology.
|
||||
|
||||
> _"I used to think anyone could contribute to Drupal if they just had the will. I was wrong—many people don't contribute to open source because they don't have the time."_
|
||||
> — Dries Buytaert
|
||||
|
||||
Buytaert [disproved the long-held belief][4] that open source is a meritocracy. The truth is that anyone who has free time to do ongoing, unpaid work is more privileged than most. If you're working a second job, caring for aging parents, or earning less due to systemic wage gaps for people of color, you can't start your open source career on equal ground.
|
||||
|
||||
> I wonder if a personal story will help :) In the past year, I dedicated my life to [#drupaldiversity][5]. The bridges that helped us achieve success at the highest level this year were often at a personal cost of my nights, weekends, and personal life.
|
||||
>
|
||||
> — Fatima (she/her) (@sugaroverflow) [April 15, 2019][6]
|
||||
|
||||
### Increasing diversity and inclusion in Drupal
|
||||
|
||||
Buytaert's keynote highlighted the Drupal project's commitment to diversity—and diversifying.
|
||||
|
||||
For example, the Drupal Association awards grants, scholarships, and money from its inclusion fund to contributors of minority status so they can travel and attend the Association's DrupalCon events. Recently, 18 contributors [received awards][7] to attend [DrupalCon Amsterdam][8] in late October.
|
||||
|
||||
In addition, the all-volunteer [Drupal Diversity & Inclusion][9] (DDI) collective works to diversify Drupal's speaker base. All of DDI's projects are open for anyone to work on in the [Drupal Diversity][10] or [DDI Contrib][11] project repositories.
|
||||
|
||||
In its August newsletter, DDI shared another way it seeks to expand awareness of diverse populations. The group starts each of its weekly meetings by asking members where they're from and to acknowledge the indigenous history of the land they live on. In July, DDI launched a related project: [Land Acknowledgements][12], which invites Drupal community members to research their homelands' indigenous histories and share them in a community blog post.
|
||||
|
||||
This project caught my eye, and I made a [contribution][13] about the indigenous history of Montgomery County, Maryland, where I live. This project is still open: [anyone can add their research][14] to the blog post.
|
||||
|
||||
To learn more, I interviewed [Alanna Burke][15], a Drupal developer who helps lead the Land Acknowledgements project. Our conversation has been edited for length and clarity.
|
||||
|
||||
### Acknowledging indigenous history
|
||||
|
||||
**Lauren Maffeo:** Describe Drupal's Land Acknowledgments project. How did the idea for this project come about, and what is its end goal?
|
||||
|
||||
**Alanna Burke:** In our weekly Slack meetings, we ask everyone to introduce themselves and do a land acknowledgment. I'm not sure when we started doing that. One week, I had the idea that it would be really neat to have folks do a little more research and contribute it back into a blog post—we do these acknowledgments, but without more context or research, they're not very meaningful. We wanted people to find out more about the land that they live on and the indigenous people who, in many cases, still live there.
|
||||
|
||||
**LM:** How long will you accept contributions to the project? Do you have an ultimate goal for project contributions?
|
||||
|
||||
**AB:** Right now, we intend to accept contributions for as long as people want to send them in!
|
||||
|
||||
**LM:** How many contributions have you received thus far?
|
||||
|
||||
**AB:** We've had four contributions, plus mine. I think folks have been busy, but that's why we made the decision to keep contributions open. We don't have a goal in terms of numbers, but I'd love to see more people do the research into their land, learn about it, and find out something interesting they didn't know before.
|
||||
|
||||
**LM:** Describe the response to this project so far. Do you have plans to expand it beyond Drupal to the broader open source community?
|
||||
|
||||
**AB:** Folks seemed to think it was a really great idea! There were definitely a lot of people who wanted to participate but haven't found the time or who just mentioned that it was cool. We haven't discussed any plans to expand it, since we focus on the Drupal community, but I'd encourage any community to take this idea and run with it, see what your community members come up with!
|
||||
|
||||
**LM:** Which leaders in the Drupal community have created and maintained this project?
|
||||
|
||||
**AB:** Myself and the other members of the DDI leadership team: Tara King, Fatima Khalid, Marc Drummond, Elli Ludwigson, Alex Laughnan, and Alex McCabe
|
||||
|
||||
**LM:** What are some 2019 highlights of Drupal's Diversity & Inclusion initiative? Which goals do you aim to achieve in 2020?
|
||||
|
||||
**AB:** Our biggest highlight this year was the Speaker Diversity Workshop, which we held on September 28th. Jill Binder of the WordPress community led this free online workshop aimed at helping underrepresented folks prepare for speaking at camps and conferences.
|
||||
|
||||
We are also going to hold an online [train-the-trainers workshop][16] on November 16th so communities can hold their own speaker workshops.
|
||||
|
||||
In 2020, we'd like to build on these successes. We did a lot of fundraising and created a lot of great relationships in order to make this happen. We have a [handful of initiatives][17] that we are working on at any given time, so we'll be continuing to work on those.
|
||||
|
||||
**LM:** How can Opensource.com readers contribute to the Land Acknowledgements post and other Drupal D&I initiatives?
|
||||
|
||||
**AB:** Check out [the doc][14] in the issue. Spend a little time doing research, write up a few paragraphs, and submit it! Or, start up an initiative in your community to do land acknowledgments in your meetings or do a collaborative post like ours. Do land acknowledgments as part of events like camps and conferences.
|
||||
|
||||
To get involved in DDI, check out our [guide][18]. We have [an issue queue][10], and we meet in Slack every Thursday for a text-only meeting.
|
||||
|
||||
**LM:** Do you have statistics for how many women and people of minority status (gender, sexuality, religion, etc.) contribute to the Drupal project? If so, what are they?
|
||||
|
||||
**AB:** We have some numbers—we'd love to have more. This [post][19] has some breakdowns, but here's the gist from 2017-2018, the latest we have:
|
||||
|
||||
* [Drupal.org][20] received code contributions from 7,287 different individuals and 1,002 different organizations.
|
||||
* The reported data shows that only 7% of the recorded contributions were made by contributors that do not identify as male, which continues to indicate a steep gender gap.
|
||||
* When measuring geographic diversity, we saw individual contributors from six different continents and 123 different countries.
|
||||
|
||||
|
||||
|
||||
Recently, we have implemented [Open Demographics][21] on Drupal.org, a project by DDI's founder, Nikki Stevens. We hope this will give us better demographic data in the future.
|
||||
|
||||
### Closing the diversity gap in open source
|
||||
|
||||
Drupal is far from alone among [open source communities with a diversity gap][22], and I think it deserves a lot of credit for tackling these issues head-on. Diversity and inclusion is a much broader topic than most of us realize. Before I read DDI's August newsletter, the history of indigenous people in my community was something that I hadn't really thought about before. Thanks to DDI's project, I'm not only aware of the people who lived in Maryland long before me, but I've come to appreciate and respect what they brought to this land.
|
||||
|
||||
I encourage you to learn about the native people in your homeland and record their history in DDI's Land Acknowledgements blog. If you're a member of another open source project, consider replicating this project there.
|
||||
|
||||
Open source research often paints the community as a homogeneous landscape. I have collected...
|
||||
|
||||
Egle Sigler, Kavit Munshi, and Carol Barrett talk about the importance of diversity in the...
|
||||
|
||||
Diversity has a new full-time ally. Marina Zhurakhinskaya recently won an O'Reilly award for her...
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/10/drupals-diversity-initiatives
|
||||
|
||||
作者:[Lauren Maffeo][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/lmaffeo
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/world_hands_diversity.png?itok=zm4EDxgE (Two diverse hands holding a globe)
|
||||
[2]: https://events.drupal.org/seattle2019
|
||||
[3]: https://www.youtube.com/watch?v=BNoCn6T9Xf8
|
||||
[4]: https://dri.es/the-privilege-of-free-time-in-open-source
|
||||
[5]: https://twitter.com/hashtag/drupaldiversity?src=hash&ref_src=twsrc%5Etfw
|
||||
[6]: https://twitter.com/sugaroverflow/status/1117876869590728705?ref_src=twsrc%5Etfw
|
||||
[7]: https://events.drupal.org/amsterdam2019/grants-scholarships
|
||||
[8]: https://events.drupal.org/amsterdam2019
|
||||
[9]: https://opencollective.com/drupal-diversity-and-inclusion
|
||||
[10]: https://www.drupal.org/project/issues/diversity
|
||||
[11]: https://www.drupal.org/project/issues/ddi_contrib
|
||||
[12]: https://www.drupaldiversity.com/blog/2019/land-acknowledgments
|
||||
[13]: https://www.drupal.org/project/diversity/issues/3063065#comment-13234777
|
||||
[14]: https://www.drupal.org/project/diversity/issues/3063065
|
||||
[15]: https://www.drupal.org/u/aburke626
|
||||
[16]: https://www.drupaldiversity.com/blog/2019/learn-how-hold-your-own-speaker-diversity-workshop-saturday-november-16
|
||||
[17]: https://www.drupaldiversity.com/initiatives
|
||||
[18]: https://www.drupaldiversity.com/get-involved
|
||||
[19]: https://dri.es/who-sponsors-drupal-development-2018
|
||||
[20]: http://Drupal.org
|
||||
[21]: https://www.drupal.org/project/open_demographics
|
||||
[22]: https://opensource.com/resources/diversity-open-source
|
@ -1,285 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (Morisun029)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Mutation testing is the evolution of TDD)
|
||||
[#]: via: (https://opensource.com/article/19/8/mutation-testing-evolution-tdd)
|
||||
[#]: author: (Alex Bunardzic https://opensource.com/users/alex-bunardzic)
|
||||
|
||||
Mutation testing is the evolution of TDD
|
||||
======
|
||||
Since test-driven development is modeled on how nature works, mutation
|
||||
testing is the natural next step in the evolution of DevOps.
|
||||
![Ants and a leaf making the word "open"][1]
|
||||
|
||||
In "[Failure is a feature in blameless DevOps][2]," I discussed the central role of failure in delivering quality by soliciting feedback. This is the failure agile DevOps teams rely on to guide them and drive development. [Test-driven development (TDD)][3] is the _[conditio sine qua non][4]_ of any agile DevOps value stream delivery. Failure-centric TDD methodology only works if it is paired with measurable tests.
|
||||
|
||||
TDD methodology is modeled on how nature works and how nature produces winners and losers in the evolutionary game.
|
||||
|
||||
### Natural selection
|
||||
|
||||
![Charles Darwin][5]
|
||||
|
||||
In 1859, [Charles Darwin][6] proposed the theory of evolution in his book _[On the Origin of Species][7]_. Darwin's thesis was that natural variability is caused by the combination of spontaneous mutations in individual organisms and environmental pressures. These pressures eliminate less-adapted organisms while favoring other, more fit organisms. Each and every living being mutates its chromosomes, and those spontaneous mutations are carried to the next generation (the offspring). The newly emerged variability is then tested under natural selection—the environmental pressures that exist due to the variability of environmental conditions.
|
||||
|
||||
This simplified diagram illustrates the process of adjusting to environmental conditions.
|
||||
|
||||
![Environmental pressures on fish][8]
|
||||
|
||||
Fig. 1. Different environmental pressures result in different outcomes governed by natural selection. Image screenshot from a [video by Richard Dawkins][9].
|
||||
|
||||
This illustration shows a school of fish in their natural habitat. The habitat varies (darker or lighter gravel at the bottom of the sea or riverbed), as does each fish (darker or lighter body patterns and colors).
|
||||
|
||||
It also shows two situations (i.e., two variations of the environmental pressure):
|
||||
|
||||
1. The predator is present
|
||||
2. The predator is absent
|
||||
|
||||
|
||||
|
||||
In the first situation, fish that are easier to spot against the gravel shade are at higher risk of being picked off by predators. When the gravel is darker, the lighter portion of the fish population is thinned out. And vice versa—when the gravel is a lighter shade, the darker portion of the fish population suffers the thinning out scenario.
|
||||
|
||||
In the second situation, fish are sufficiently relaxed to engage in mating. In the absence of predators and in the presence of the mating ritual, the opposite results can be expected: The fish that stand out against the background have a better chance of being picked for mating and transferring their characteristics to offspring.
|
||||
|
||||
### Selection criteria
|
||||
|
||||
When selecting among variability, the process is never arbitrary, capricious, whimsical, nor random. The decisive factor is always measurable. That decisive factor is usually called a _test_ or a _goal_.
|
||||
|
||||
A simple mathematical example can illustrate this process of decision making. (Only in this case it won't be governed by natural selection, but by artificial selection.) Suppose someone asks you to build a little function that will take a positive number and calculate that number's square root. How would you go about doing that?
|
||||
|
||||
The agile DevOps way is to _fail fast_. Start with humility, admitting upfront that you don't really know how to develop that function. All you know, at this point, is how to _describe_ what you'd like to do. In technical parlance, you are ready to engage in crafting a _unit test_.
|
||||
|
||||
"Unit test" describes your specific expectation. It could simply be formulated as "given the number 16, I expect the square root function to return number 4." You probably know that the square root of 16 is 4. However, you don't know the square root for some larger numbers (such as 533).
|
||||
|
||||
At the very least, you have formulated your selection criteria, your test or goal.
|
||||
|
||||
### Implement the failing test
|
||||
|
||||
The [.NET Core][10] platform can illustrate the implementation. .NET typically uses [xUnit.net][11] as a unit-testing framework. (To follow the coding examples, please install .NET Core and xUnit.net.)
|
||||
|
||||
Open the command line and create a folder where your square root solution will be implemented. For example, type:
|
||||
|
||||
|
||||
```
|
||||
`mkdir square_root`
|
||||
```
|
||||
|
||||
Then type:
|
||||
|
||||
|
||||
```
|
||||
`cd square_root`
|
||||
```
|
||||
|
||||
Create a separate folder for unit tests:
|
||||
|
||||
|
||||
```
|
||||
`mkdir unit_tests`
|
||||
```
|
||||
|
||||
Move into the **unit_tests** folder (**cd unit_tests**) and initiate the xUnit framework:
|
||||
|
||||
|
||||
```
|
||||
`dotnet new xunit`
|
||||
```
|
||||
|
||||
Now, move one folder up to the **square_root** folder, and create the **app** folder:
|
||||
|
||||
|
||||
```
|
||||
mkdir app
|
||||
cd app
|
||||
```
|
||||
|
||||
Create the scaffold necessary for the C# code:
|
||||
|
||||
|
||||
```
|
||||
`dotnet new classlib`
|
||||
```
|
||||
|
||||
Now open your favorite editor and start cracking!
|
||||
|
||||
In your code editor, navigate to the **unit_tests** folder and open **UnitTest1.cs**.
|
||||
|
||||
Replace auto-generated code in **UnitTest1.cs** with:
|
||||
|
||||
|
||||
```
|
||||
using System;
|
||||
using Xunit;
|
||||
using app;
|
||||
|
||||
namespace unit_tests{
|
||||
|
||||
public class UnitTest1{
|
||||
Calculator calculator = new Calculator();
|
||||
|
||||
[Fact]
|
||||
public void GivenPositiveNumberCalculateSquareRoot(){
|
||||
var expected = 4;
|
||||
var actual = calculator.CalculateSquareRoot(16);
|
||||
Assert.Equal(expected, actual);
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This unit test describes the expectation that the variable **expected** should be 4. The next line describes the **actual** value. It proposes to calculate the **actual** value by sending a message to the component called **calculator**. This component is described as capable of handling the **CalculateSquareRoot** message by accepting a numeric value. That component hasn't been developed yet. But it doesn't really matter, because this merely describes the expectations.
|
||||
|
||||
Finally, it describes what happens when the message is triggered to be sent. At that point, it asserts whether the **expected** value is equal to the **actual** value. If it is, the test passed and the goal is reached. If the **expected** value isn't equal to the **actual value**, the test fails.
|
||||
|
||||
Next, to implement the component called **calculator**, create a new file in the **app** folder and call it **Calculator.cs**. To implement a function that calculates the square root of a number, add the following code to this new file:
|
||||
|
||||
|
||||
```
|
||||
namespace app {
|
||||
public class Calculator {
|
||||
public double CalculateSquareRoot(double number) {
|
||||
double bestGuess = number;
|
||||
return bestGuess;
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Before you can test this implementation, you need to instruct the unit test how to find this new component (**Calculator**). Navigate to the **unit_tests** folder and open the **unit_tests.csproj** file. Add the following line in the **<ItemGroup>** code block:
|
||||
|
||||
|
||||
```
|
||||
`<ProjectReference Include="../app/app.csproj" />`
|
||||
```
|
||||
|
||||
Save the **unit_test.csproj** file. Now you are ready for your first test run.
|
||||
|
||||
Go to the command line and **cd** into the **unit_tests** folder. Run the following command:
|
||||
|
||||
|
||||
```
|
||||
`dotnet test`
|
||||
```
|
||||
|
||||
Running the unit test will produce the following output:
|
||||
|
||||
![xUnit output after the unit test run fails][12]
|
||||
|
||||
Fig. 2. xUnit output after the unit test run fails.
|
||||
|
||||
As you can see, the unit test failed. It expected that sending number 16 to the **calculator** component would result in the number 4 as the output, but the output (the **actual** value) was the number 16.
|
||||
|
||||
Congratulations! You have created your first failure. Your unit test provided strong, immediate feedback urging you to fix the failure.
|
||||
|
||||
### Fix the failure
|
||||
|
||||
To fix the failure, you must improve **bestGuess**. Right now, **bestGuess** merely takes the number the function receives and returns it. Not good enough.
|
||||
|
||||
But how do you figure out a way to calculate the square root value? I have an idea—how about looking at how Mother Nature solves problems.
|
||||
|
||||
### Emulate Mother Nature by iterating
|
||||
|
||||
It is extremely hard (pretty much impossible) to guess the correct value from the first (and only) attempt. You must allow for several attempts at guessing to increase your chances of solving the problem. And one way to allow for multiple attempts is to _iterate_.
|
||||
|
||||
To iterate, store the **bestGuess** value in the **previousGuess** variable, transform the **bestGuess** value, and compare the difference between the two values. If the difference is 0, you solved the problem. Otherwise, keep iterating.
|
||||
|
||||
Here is the body of the function that produces the correct value for the square root of any positive number:
|
||||
|
||||
|
||||
```
|
||||
double bestGuess = number;
|
||||
double previousGuess;
|
||||
|
||||
do {
|
||||
previousGuess = bestGuess;
|
||||
bestGuess = (previousGuess + (number/previousGuess))/2;
|
||||
} while((bestGuess - previousGuess) != 0);
|
||||
|
||||
return bestGuess;
|
||||
```
|
||||
|
||||
This loop (iteration) converges bestGuess values to the desired solution. Now your carefully crafted unit test passes!
|
||||
|
||||
![Unit test successful][13]
|
||||
|
||||
Fig. 3. Unit test successful, 0 tests failed.
|
||||
|
||||
### The iteration solves the problem
|
||||
|
||||
Just like Mother Nature's approach, in this exercise, iteration solves the problem. An incremental approach combined with stepwise refinement is the guaranteed way to arrive at a satisfactory solution. The decisive factor in this game is having a measurable goal and test. Once you have that, you can keep iterating until you hit the mark.
|
||||
|
||||
### Now the punchline!
|
||||
|
||||
OK, this was an amusing experiment, but the more interesting discovery comes from playing with this newly minted solution. Until now, your starting **bestGuess** was always equal to the number the function receives as the input parameter. What happens if you change the initial **bestGuess**?
|
||||
|
||||
To test that, you can run a few scenarios. First, observe the stepwise refinement as the iteration loops through a series of guesses as it tries to calculate the square root of 25:
|
||||
|
||||
![Code iterating for the square root of 25][14]
|
||||
|
||||
Fig. 4. Iterating to calculate the square root of 25.
|
||||
|
||||
Starting with 25 as the **bestGuess**, it takes eight iterations for the function to calculate the square root of 25. But what would happen if you made a comical, ridiculously wrong stab at the **bestGuess**? What if you started with a clueless second guess, that 1 million might be the square root of 25? What would happen in such an obviously erroneous situation? Would your function be able to deal with such idiocy?
|
||||
|
||||
Take a look at the horse's mouth. Rerun the scenario, this time starting from 1 million as the **bestGuess**:
|
||||
|
||||
![Stepwise refinement][15]
|
||||
|
||||
Fig. 5. Stepwise refinement when calculating the square root of 25 by starting with 1 million as the initial **bestGuess**.
|
||||
|
||||
Oh wow! Starting with a ludicrously large number, the number of iterations only tripled (from eight iterations to 23). Not nearly as dramatic an increase as you might intuitively expect.
|
||||
|
||||
### The moral of the story
|
||||
|
||||
The _Aha!_ moment arrives when you realize that, not only is iteration guaranteed to solve the problem, but it doesn't matter whether your search for the solution begins with a good or a terribly botched initial guess. However erroneous your initial understanding, the process of iteration, coupled with a measurable test/goal, puts you on the right track and delivers the solution. Guaranteed.
|
||||
|
||||
Figures 4 and 5 show a steep and dramatic burndown. From a wildly incorrect starting point, the iteration quickly burns down to an absolutely correct solution.
|
||||
|
||||
This amazing methodology, in a nutshell, is the essence of agile DevOps.
|
||||
|
||||
### Back to some high-level observations
|
||||
|
||||
Agile DevOps practice stems from the recognition that we live in a world that is fundamentally based on uncertainty, ambiguity, incompleteness, and a healthy dose of confusion. From the scientific/philosophical point of view, these traits are well documented and supported by [Heisenberg's Uncertainty Principle][16] (covering the uncertainty part), [Wittgenstein's Tractatus Logico-Philosophicus][17] (the ambiguity part), [Gödel's incompleteness theorems][18] (the incompleteness aspect), and the [Second Law of Thermodynamics][19] (the confusion caused by relentless entropy).
|
||||
|
||||
In a nutshell, no matter how hard you try, you can never get complete information when trying to solve any problem. It is, therefore, more profitable to abandon an arrogant stance and adopt a more humble approach to solving problems. Humility pays big dividends in rewarding you—not only with the hoped-for solution but also with the byproduct of a well-structured solution.
|
||||
|
||||
### Conclusion
|
||||
|
||||
Nature works incessantly—it's a continuous flow. Nature has no master plan; everything happens as a response to what happened earlier. The feedback loops are very tight, and apparent progress/regress is piecemeal. Everywhere you look in nature, you see stepwise refinement, in one shape or form or another.
|
||||
|
||||
Agile DevOps is a very interesting outcome of the engineering model's gradual maturation. DevOps is based on the recognition that the information you have available is always incomplete, so you'd better proceed cautiously. Obtain a measurable test (e.g., a hypothesis, a measurable expectation), make a humble attempt at satisfying it, most likely fail, then collect the feedback, fix the failure, and continue. There is no plan other than agreeing that, with each step of the way, there must be a measurable hypothesis/test.
|
||||
|
||||
In the next article in this series, I'll take a closer look at how mutation testing provides much-needed feedback that drives value.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/8/mutation-testing-evolution-tdd
|
||||
|
||||
作者:[Alex Bunardzic][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/alex-bunardzic
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_520X292_openanttrail-2.png?itok=xhD3WmUd (Ants and a leaf making the word "open")
|
||||
[2]: https://opensource.com/article/19/7/failure-feature-blameless-devops
|
||||
[3]: https://en.wikipedia.org/wiki/Test-driven_development
|
||||
[4]: https://www.merriam-webster.com/dictionary/conditio%20sine%20qua%20non
|
||||
[5]: https://opensource.com/sites/default/files/uploads/darwin.png (Charles Darwin)
|
||||
[6]: https://en.wikipedia.org/wiki/Charles_Darwin
|
||||
[7]: https://en.wikipedia.org/wiki/On_the_Origin_of_Species
|
||||
[8]: https://opensource.com/sites/default/files/uploads/environmentalconditions2.png (Environmental pressures on fish)
|
||||
[9]: https://www.youtube.com/watch?v=MgK5Rf7qFaU
|
||||
[10]: https://dotnet.microsoft.com/
|
||||
[11]: https://xunit.net/
|
||||
[12]: https://opensource.com/sites/default/files/uploads/xunit-output.png (xUnit output after the unit test run fails)
|
||||
[13]: https://opensource.com/sites/default/files/uploads/unit-test-success.png (Unit test successful)
|
||||
[14]: https://opensource.com/sites/default/files/uploads/iterating-square-root.png (Code iterating for the square root of 25)
|
||||
[15]: https://opensource.com/sites/default/files/uploads/bestguess.png (Stepwise refinement)
|
||||
[16]: https://en.wikipedia.org/wiki/Uncertainty_principle
|
||||
[17]: https://en.wikipedia.org/wiki/Tractatus_Logico-Philosophicus
|
||||
[18]: https://en.wikipedia.org/wiki/G%C3%B6del%27s_incompleteness_theorems
|
||||
[19]: https://en.wikipedia.org/wiki/Second_law_of_thermodynamics
|
@ -1,118 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Essential Accessories for Intel NUC Mini PC)
|
||||
[#]: via: (https://itsfoss.com/intel-nuc-essential-accessories/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
Essential Accessories for Intel NUC Mini PC
|
||||
======
|
||||
|
||||
I bought a [barebone Intel NUC mini PC][1] a few weeks back. I [installed Linux on it][2] and I am totally enjoying it. This tiny fanless gadget replaces that bulky CPU of the desktop computer.
|
||||
|
||||
Intel NUC mostly comes in barebone format which means it doesn’t have any RAM, hard disk and obviously no operating system. Many [Linux-based mini PCs][3] customize the Intel NUC and sell them to end users by adding disk, RAM and operating systems.
|
||||
|
||||
Needless to say that it doesn’t come with keyboard, mouse or screen just like most other desktop computers out there.
|
||||
|
||||
[Intel NUC][4] is an excellent device and if you are looking to buy a desktop computer, I highly recommend it. And if you are considering to get Intel NUC, here are a few accessories you should have in order to start using the NUC as your computer.
|
||||
|
||||
### Essential Intel NUC accessories
|
||||
|
||||
![][5]
|
||||
|
||||
_The Amazon links in the article are affiliate links. Please read our [affiliate policy][6]._
|
||||
|
||||
#### The peripheral devices: monitor, keyboard and mouse
|
||||
|
||||
This is a no-brainer. You need to have a screen, keyboard and mouse to use a computer. You’ll need a monitor with HDMI connection and USB or wireless keyboard-mouse. If you have these things already, you are good to go.
|
||||
|
||||
If you are looking for recommendations, I suggest LG IPS LED monitor. I have two of them in 22 inch model and I am happy with the sharp visuals it provides.
|
||||
|
||||
These monitors have a simple stand that doesn’t move. If you want a monitor that can move up and down and rotate in portrait mode, try [HP EliteDisplay monitors][7].
|
||||
|
||||
![HP EliteDisplay Monitor][8]
|
||||
|
||||
I connect all three monitors at the same time in a multi-monitor setup. One monitor connects to the given HDMI port. Two monitors connect to thunderbolt port via a [thunderbolt to HDMI splitter from Club 3D][9].
|
||||
|
||||
You may also opt for the ultrawide monitors. I don’t have a personal experience with them.
|
||||
|
||||
#### A/C power cord
|
||||
|
||||
This will be a surprise for you When you get your NUC, you’ll notice that though it has power adapter, it’s not complete with the plug.
|
||||
|
||||
![][10]
|
||||
|
||||
Since different countries have different plug points, Intel decided to simply drop it from the NUC kit. I am using the power cord of an old dead laptop but if you don’t have one, chances are that you may have to get one for yourself.
|
||||
|
||||
#### RAM
|
||||
|
||||
Intel NUC has two RAM slots and it can support up to 32 GB of RAM. Since I have the core i3 processor, I opted from [8GB DDR4 RAM from Crucial][11] that costs around $33.
|
||||
|
||||
![][12]
|
||||
|
||||
8 GB RAM is fine for most cases but if you have core i7 processor, you may opt for a [16 GB RAM][13] one that costs almost $67. You can double it up and get the maximum 32 GB. The choice is all yours.
|
||||
|
||||
#### Hard disk [Important]
|
||||
|
||||
Intel NUC supports both 2.5 drive and M.2 SSD and you can use both at the same time to get more storage.
|
||||
|
||||
The 2.5 inches slot can hold both SSD and HDD. I strongly recommend to opt for SSD because it’s way faster than HDD. A [480 GB 2.5][14] costs $60. Which is a fair price in my opinion.
|
||||
|
||||
![][15]
|
||||
|
||||
The 2.5″ drive is limited with the standard SATA interface speed of 6Gb/sec. The M.2 slot could be faster depending upon whether you are choosing a NVMe SSD or not. The NVMe (non volatile memory express) SSDs are up to 4 times faster than the normal SSDs (also called SATA SSD). But they may also be slightly more expensive than SATA M2 SSD.
|
||||
|
||||
While buying the M.2 SSD, check the product image. It should be mentioned on the image of the disk itself whether it’s a NVMe or SATA SSD. [Samsung EVO is a cost effective NVMe M.2 SSD][16] that you may consider.
|
||||
|
||||
![Make sure that your are buying the faster NVMe M2 SSD][17]
|
||||
|
||||
A SATA SSD in both M.2 slot and 2.5″ slot has the same speed. This is why if you don’t want to opt for the expensive NVMe SSD, I suggest you go for the 2.5″ SATA SSD and keep the M.2 slot free for future upgrades.
|
||||
|
||||
#### Other supporting accessories
|
||||
|
||||
You’ll need HDMI cable to connect your monitor. If you are buying a new monitor, you should usually get a cable with it.
|
||||
|
||||
You may need a screw driver if you are going to use the M.2 slot. Intel NUC is an excellent device and you can unscrew the bottom panel just by rotating the four pods simply by your hands. You’ll have to open the device in order to place the RAM and disk.
|
||||
|
||||
![Intel NUC with Security Cable | Image Credit Intel][18]
|
||||
|
||||
NUC also has the antitheft key lock hole that you can use with security cables. Keeping computers secure with cables is a recommended security practices in a business environment. Investing a [few dollars in the security cable][19] could save you hundreds of dollars.
|
||||
|
||||
**What accessories do you use?**
|
||||
|
||||
That’s the Intel NUC accessories I use and I suggest. How about you? If you own a NUC, what accessories you use and recommend to other NUC users?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/intel-nuc-essential-accessories/
|
||||
|
||||
作者:[Abhishek Prakash][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/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.amazon.com/Intel-NUC-Mainstream-Kit-NUC8i3BEH/dp/B07GX4X4PW?psc=1&SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07GX4X4PW (barebone Intel NUC mini PC)
|
||||
[2]: https://itsfoss.com/install-linux-on-intel-nuc/
|
||||
[3]: https://itsfoss.com/linux-based-mini-pc/
|
||||
[4]: https://www.intel.in/content/www/in/en/products/boards-kits/nuc.html
|
||||
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/09/intel-nuc-accessories.png?ssl=1
|
||||
[6]: https://itsfoss.com/affiliate-policy/
|
||||
[7]: https://www.amazon.com/HP-EliteDisplay-21-5-Inch-1FH45AA-ABA/dp/B075L4VKQF?SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B075L4VKQF (HP EliteDisplay monitors)
|
||||
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/09/hp-elitedisplay-monitor.png?ssl=1
|
||||
[9]: https://www.amazon.com/Club3D-CSV-1546-USB-C-Multi-Monitor-Splitter/dp/B06Y2FX13G?SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B06Y2FX13G (thunderbolt to HDMI splitter from Club 3D)
|
||||
[10]: https://itsfoss.com/wp-content/uploads/2019/09/ac-power-cord-3-pongs.webp
|
||||
[11]: https://www.amazon.com/Crucial-Single-PC4-19200-SODIMM-260-Pin/dp/B01BIWKP58?psc=1&SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B01BIWKP58 (8GB DDR4 RAM from Crucial)
|
||||
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/09/crucial-ram.jpg?ssl=1
|
||||
[13]: https://www.amazon.com/Crucial-Single-PC4-19200-SODIMM-260-Pin/dp/B019FRBHZ0?psc=1&SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B019FRBHZ0 (16 GB RAM)
|
||||
[14]: https://www.amazon.com/Green-480GB-Internal-SSD-WDS480G2G0A/dp/B01M3POPK3?psc=1&SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B01M3POPK3 (480 GB 2.5)
|
||||
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/09/wd-green-ssd.png?ssl=1
|
||||
[16]: https://www.amazon.com/Samsung-970-EVO-500GB-MZ-V7E500BW/dp/B07BN4NJ2J?psc=1&SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07BN4NJ2J (Samsung EVO is a cost effective NVMe M.2 SSD)
|
||||
[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/09/samsung-evo-nvme.jpg?ssl=1
|
||||
[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/09/intel-nuc-security-cable.jpg?ssl=1
|
||||
[19]: https://www.amazon.com/Kensington-Combination-Laptops-Devices-K64673AM/dp/B005J7Y99W?psc=1&SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B005J7Y99W (few dollars in the security cable)
|
@ -1,100 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Command line quick tips: Locate and process files with find and xargs)
|
||||
[#]: via: (https://fedoramagazine.org/command-line-quick-tips-locate-and-process-files-with-find-and-xargs/)
|
||||
[#]: author: (Ben Cotton https://fedoramagazine.org/author/bcotton/)
|
||||
|
||||
Command line quick tips: Locate and process files with find and xargs
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
**find** is one of the more powerful and flexible command-line programs in the daily toolbox. It does what the name suggests: it finds files and directories that match the conditions you specify. And with arguments like **-exec** or **-delete**, you can have find take action on what it… finds.
|
||||
|
||||
In this installment of the [Command Line Quick Tips][2] series, you’ll get an introduction to the **find** command and learn how to use it to process files with built-in commands or the **xargs** command.
|
||||
|
||||
### Finding files
|
||||
|
||||
At a minimum, **find** takes a path to find things in. For example, this command will find (and print) every file on the system:
|
||||
|
||||
```
|
||||
find /
|
||||
```
|
||||
|
||||
And since everything is a file, you will get a lot of output to sort through. This probably doesn’t help you locate what you’re looking for. You can change the path argument to narrow things down a bit, but it’s still not really any more helpful than using the **ls** command. So you need to think about what you’re trying to locate.
|
||||
|
||||
Perhaps you want to find all the JPEG files in your home directory. The **-name** argument allows you to restrict your results to files that match the given pattern.
|
||||
|
||||
```
|
||||
find ~ -name '*jpg'
|
||||
```
|
||||
|
||||
But wait! What if some of them have an uppercase extension? **-iname** is like **-name**, but it is case-insensitive:
|
||||
|
||||
```
|
||||
find ~ -iname '*jpg'
|
||||
```
|
||||
|
||||
Great! But the 8.3 name scheme is so 1985. Some of the pictures might have a .jpeg extension. Fortunately, we can combine patterns with an “or,” represented by **-o**. The parentheses are escaped so that the shell doesn’t try to interpret them instead of the **find** command.
|
||||
|
||||
```
|
||||
find ~ \( -iname 'jpeg' -o -iname 'jpg' \)
|
||||
```
|
||||
|
||||
We’re getting closer. But what if you have some directories that end in jpg? (Why you named a directory **bucketofjpg** instead of **pictures** is beyond me.) We can modify our command with the **-type** argument to look only for files:
|
||||
|
||||
```
|
||||
find ~ \( -iname '*jpeg' -o -iname '*jpg' \) -type f
|
||||
```
|
||||
|
||||
Or maybe you’d like to find those oddly named directories so you can rename them later:
|
||||
|
||||
```
|
||||
find ~ \( -iname '*jpeg' -o -iname '*jpg' \) -type d
|
||||
```
|
||||
|
||||
It turns out you’ve been taking a lot of pictures lately, so narrow this down to files that have changed in the last week with **-mtime** (modification time). The **-7** means all files modified in 7 days or fewer.
|
||||
|
||||
```
|
||||
find ~ \( -iname '*jpeg' -o -iname '*jpg' \) -type f -mtime -7
|
||||
```
|
||||
|
||||
### Taking action with xargs
|
||||
|
||||
The **xargs** command takes arguments from the standard input stream and executes a command based on them. Sticking with the example in the previous section, let’s say you want to copy all of the JPEG files in your home directory that have been modified in the last week to a thumb drive that you’ll attach to a digital photo display. Assume you already have the thumb drive mounted as _/media/photo_display_.
|
||||
|
||||
```
|
||||
find ~ \( -iname '*jpeg' -o -iname '*jpg' \) -type f -mtime -7 -print0 | xargs -0 cp -t /media/photo_display
|
||||
```
|
||||
|
||||
The **find** command is slightly modified from the previous version. The **-print0** command makes a subtle change on how the output is written: instead of using a newline, it adds a null character. The **-0** (zero) option to **xargs** adjusts the parsing to expect this. This is important because otherwise actions on file names that contain spaces, quotes, or other special characters may not work as expected. You should use these options whenever you’re taking action on files.
|
||||
|
||||
The **-t** argument to **cp** is important because **cp** normally expects the destination to come last. You can do this without **xargs** using **find**‘s **-exec** command, but the **xargs** method will be faster, especially with a large number of files, because it will run as a single invocation of **cp**.
|
||||
|
||||
### Find out more
|
||||
|
||||
This post only scratches the surface of what **find** can do. **find** supports testing based on permissions, ownership, access time, and much more. It can even compare the files in the search path to other files. Combining tests with Boolean logic can give you incredible flexibility to find exactly the files you’re looking for. With build in commands or piping to **xargs**, you can quickly process a large set of files.
|
||||
|
||||
_Portions of this article were previously published on [Opensource.com][3]._ _Photo by _[_Warren Wong_][4]_ on [Unsplash][5]_.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/command-line-quick-tips-locate-and-process-files-with-find-and-xargs/
|
||||
|
||||
作者:[Ben Cotton][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/bcotton/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2018/10/commandlinequicktips-816x345.jpg
|
||||
[2]: https://fedoramagazine.org/?s=command+line+quick+tips
|
||||
[3]: https://opensource.com/article/18/4/how-use-find-linux
|
||||
[4]: https://unsplash.com/@wflwong?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
||||
[5]: https://unsplash.com/s/photos/search?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
@ -0,0 +1,163 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to Enable EPEL Repository on CentOS 8 and RHEL 8 Server)
|
||||
[#]: via: (https://www.linuxtechi.com/enable-epel-repo-centos8-rhel8-server/)
|
||||
[#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/)
|
||||
|
||||
How to Enable EPEL Repository on CentOS 8 and RHEL 8 Server
|
||||
======
|
||||
|
||||
**EPEL** Stands for Extra Packages for Enterprise Linux, it is a free and opensource additional packages repository available for **CentOS** and **RHEL** servers. As the name suggests, EPEL repository provides extra and additional packages which are not available in the default package repositories of [CentOS 8][1] and [RHEL 8][2].
|
||||
|
||||
In this article we will demonstrate how to enable and use epel repository on CentOS 8 and RHEL 8 Server.
|
||||
|
||||
[![EPEL-Repo-CentOS8-RHEL8][3]][4]
|
||||
|
||||
### Prerequisites of EPEL Repository
|
||||
|
||||
* Minimal CentOS 8 and RHEL 8 Server
|
||||
* Root or sudo admin privileges
|
||||
* Internet Connection
|
||||
|
||||
|
||||
|
||||
### Install and Enable EPEL Repository on RHEL 8.x Server
|
||||
|
||||
Login or ssh to your RHEL 8.x server and execute the following dnf command to install EPEL rpm package,
|
||||
|
||||
```
|
||||
[root@linuxtechi ~]# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
|
||||
```
|
||||
|
||||
Output of above command would be something like below,
|
||||
|
||||
![dnf-install-epel-repo-rehl8][3]
|
||||
|
||||
Once epel rpm package is installed successfully then it will automatically enable and configure its yum / dnf repository. Run following dnf or yum command to verify whether EPEL repository is enabled or not,
|
||||
|
||||
```
|
||||
[root@linuxtechi ~]# dnf repolist epel
|
||||
Or
|
||||
[root@linuxtechi ~]# dnf repolist epel -v
|
||||
```
|
||||
|
||||
![epel-repolist-rhel8][3]
|
||||
|
||||
### Install and Enable EPEL Repository on CentOS 8.x Server
|
||||
|
||||
Login or ssh to your CentOS 8 server and execute following dnf or yum command to install ‘**epel-release**‘ rpm package. In CentOS 8 server, epel rpm package is available in its default package repository.
|
||||
|
||||
```
|
||||
[root@linuxtechi ~]# dnf install epel-release -y
|
||||
Or
|
||||
[root@linuxtechi ~]# yum install epel-release -y
|
||||
```
|
||||
|
||||
Execute the following commands to verify the status of epel repository on CentOS 8 server,
|
||||
|
||||
```
|
||||
[root@linuxtechi ~]# dnf repolist epel
|
||||
Last metadata expiration check: 0:00:03 ago on Sun 13 Oct 2019 04:18:05 AM BST.
|
||||
repo id repo name status
|
||||
*epel Extra Packages for Enterprise Linux 8 - x86_64 1,977
|
||||
[root@linuxtechi ~]#
|
||||
[root@linuxtechi ~]# dnf repolist epel -v
|
||||
……………………
|
||||
Repo-id : epel
|
||||
Repo-name : Extra Packages for Enterprise Linux 8 - x86_64
|
||||
Repo-status : enabled
|
||||
Repo-revision: 1570844166
|
||||
Repo-updated : Sat 12 Oct 2019 02:36:32 AM BST
|
||||
Repo-pkgs : 1,977
|
||||
Repo-size : 2.1 G
|
||||
Repo-metalink: https://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=x86_64&infra=stock&content=centos
|
||||
Updated : Sun 13 Oct 2019 04:28:24 AM BST
|
||||
Repo-baseurl : rsync://repos.del.extreme-ix.org/epel/8/Everything/x86_64/ (34 more)
|
||||
Repo-expire : 172,800 second(s) (last: Sun 13 Oct 2019 04:28:24 AM BST)
|
||||
Repo-filename: /etc/yum.repos.d/epel.repo
|
||||
Total packages: 1,977
|
||||
[root@linuxtechi ~]#
|
||||
```
|
||||
|
||||
Above command’s output confirms that we have successfully enabled epel repo. Let’s perform some basic operations on EPEL repo.
|
||||
|
||||
### List all available packages from epel repository
|
||||
|
||||
If you want to list all the packages from epel repository then run the following dnf command,
|
||||
|
||||
```
|
||||
[root@linuxtechi ~]# dnf repository-packages epel list
|
||||
……………
|
||||
Last metadata expiration check: 0:38:18 ago on Sun 13 Oct 2019 04:28:24 AM BST.
|
||||
Installed Packages
|
||||
epel-release.noarch 8-6.el8 @epel
|
||||
Available Packages
|
||||
BackupPC.x86_64 4.3.1-2.el8 epel
|
||||
BackupPC-XS.x86_64 0.59-3.el8 epel
|
||||
CGSI-gSOAP.x86_64 1.3.11-7.el8 epel
|
||||
CGSI-gSOAP-devel.x86_64 1.3.11-7.el8 epel
|
||||
Field3D.x86_64 1.7.2-16.el8 epel
|
||||
Field3D-devel.x86_64 1.7.2-16.el8 epel
|
||||
GraphicsMagick.x86_64 1.3.33-1.el8 epel
|
||||
GraphicsMagick-c++.x86_64 1.3.33-1.el8 epel
|
||||
…………………………
|
||||
zabbix40-web-mysql.noarch 4.0.12-1.el8 epel
|
||||
zabbix40-web-pgsql.noarch 4.0.12-1.el8 epel
|
||||
zerofree.x86_64 1.1.1-3.el8 epel
|
||||
zimg.x86_64 2.8-4.el8 epel
|
||||
zimg-devel.x86_64 2.8-4.el8 epel
|
||||
zstd.x86_64 1.4.2-1.el8 epel
|
||||
zvbi.x86_64 0.2.35-9.el8 epel
|
||||
zvbi-devel.x86_64 0.2.35-9.el8 epel
|
||||
zvbi-fonts.noarch 0.2.35-9.el8 epel
|
||||
[root@linuxtechi ~]#
|
||||
```
|
||||
|
||||
### Search a package from epel repository
|
||||
|
||||
Let’s assume if we want to search Zabbix package in epel repository, execute the following dnf command,
|
||||
|
||||
```
|
||||
[root@linuxtechi ~]# dnf repository-packages epel list | grep -i zabbix
|
||||
```
|
||||
|
||||
Output of above command would be something like below,
|
||||
|
||||
![epel-repo-search-package-centos8][3]
|
||||
|
||||
### Install a package from epel repository
|
||||
|
||||
Let’s assume we want to install htop package from epel repo, then issue the following dnf command,
|
||||
|
||||
Syntax:
|
||||
|
||||
# dnf –enablerepo=”epel” install <pkg_name>
|
||||
|
||||
```
|
||||
[root@linuxtechi ~]# dnf --enablerepo="epel" install htop -y
|
||||
```
|
||||
|
||||
**Note:** If we don’t specify the “**–enablerepo=epel**” in above command then it will look for htop package in all available package repositories.
|
||||
|
||||
That’s all from this article, I hope above steps helps you to enable and configure EPEL repository on CentOS 8 and RHEL 8 Server, please don’t hesitate to share your comments and feedback in below comments section.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linuxtechi.com/enable-epel-repo-centos8-rhel8-server/
|
||||
|
||||
作者:[Pradeep Kumar][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.linuxtechi.com/author/pradeep/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.linuxtechi.com/centos-8-installation-guide-screenshots/
|
||||
[2]: https://www.linuxtechi.com/install-configure-kvm-on-rhel-8/
|
||||
[3]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
|
||||
[4]: https://www.linuxtechi.com/wp-content/uploads/2019/10/EPEL-Repo-CentOS8-RHEL8.jpg
|
@ -0,0 +1,98 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Object-Oriented Programming and Essential State)
|
||||
[#]: via: (https://theartofmachinery.com/2019/10/13/oop_and_essential_state.html)
|
||||
[#]: author: (Simon Arneaud https://theartofmachinery.com)
|
||||
|
||||
Object-Oriented Programming and Essential State
|
||||
======
|
||||
|
||||
Back in 2015, Brian Will wrote a provocative blog post: [Object-Oriented Programming: A Disaster Story][1]. He followed it up with a video called [Object-Oriented Programming is Bad][2], which is much more detailed. I recommend taking the time to watch the video, but here’s my one-paragraph summary:
|
||||
|
||||
The Platonic ideal of OOP is a sea of decoupled objects that send stateless messages to one another. No one really makes software like that, and Brian points out that it doesn’t even make sense: objects need to know which other objects to send messages to, and that means they need to hold references to one another. Most of the video is about the pain that happens trying to couple objects for control flow, while pretending that they’re decoupled by design.
|
||||
|
||||
Overall his ideas resonate with my own experiences of OOP: objects can be okay, but I’ve just never been satisfied with object-_orientation_ for modelling a program’s control flow, and trying to make code “properly” object-oriented always seems to create layers of unneccessary complexity.
|
||||
|
||||
There’s one thing I don’t think he explains fully. He says outright that “encapsulation does not work”, but follows it with the footnote “at fine-grained levels of code”, and goes on to acknowledge that objects can sometimes work, and that encapsulation can be okay at the level of, say, a library or file. But he doesn’t explain exactly why it sometimes works and sometimes doesn’t, and how/where to draw the line. Some people might say that makes his “OOP is bad” claim flawed, but I think his point stands, and that the line can be drawn between essential state and accidental state.
|
||||
|
||||
If you haven’t heard this usage of the terms “essential” and “accidental” before, you should check out Fred Brooks’ classic [No Silver Bullet][3] essay. (He’s written many great essays about building software systems, by the way.) I’ve aleady written [my own post about essential and accidential complexity][4] before, but here’s a quick TL;DR: Software is complex. Partly that’s because we want software to solve messy real-world problems, and we call that “essential complexity”. “Accidental complexity” is all the other complexity that exists because we’re trying to use silicon and metal to solve problems that have nothing to do with silicon and metal. For example, code for memory management, or transferring data between RAM and disk, or parsing text formats, is all “accidental complexity” for most programs.
|
||||
|
||||
Suppose you’re building a chat application that supports multiple channels. Messages can arrive for any channel at any time. Some channels are especially interesting and the user wants to be notified or pinged when a new message comes in. Other channels are muted: the message is stored, but the user isn’t interrupted. You need to keep track of the user’s preferred setting for each channel.
|
||||
|
||||
One way to do it is to use a map (a.k.a, hash table, dictionary or associative array) between the channels and channel settings. Note that a map is the kind of abstract data type (ADT) that Brian Will said can work as an object.
|
||||
|
||||
If we get a debugger and look inside the map object in memory, what will we see? We’ll find channel IDs and channel settings data of course (or pointers to them, at least). But we’ll also find other data. If the map is implemented using a red-black tree, we’ll see tree node objects with red/black labels and pointers to other nodes. The channel-related data is the essential state, and the tree nodes are the accidental state. Notice something, though: The map effectively encapsulates its accidental state — you could replace the map with another one implemented using AVL trees and your chat app would still work. On the other hand, the map doesn’t encapsulate the essential state (simply using `get()` and `set()` methods to access data isn’t encapsulation). In fact, the map is as agnostic as possible about the essential state — you could use basically the same map data structure to store other mappings unrelated to channels or notifications.
|
||||
|
||||
And that’s why the map ADT is so successful: it encapsulates accidental state and is decoupled from essential state. If you think about it, the problems that Brian describes with encapsulation are problems with trying to encapsulate essential state. The benefits that others describe are benefits from encapsulating accidental state.
|
||||
|
||||
It’s pretty hard to make entire software systems meet this ideal, but scaling up, I think it looks something like this:
|
||||
|
||||
* No global, mutable state
|
||||
* Accidental state encapsulated (in objects or modules or whatever)
|
||||
* Stateless accidental complexity enclosed in free functions, decoupled from data
|
||||
* Inputs and outputs made explicit using tricks like dependency injection
|
||||
* Components fully owned and controlled from easily identifiable locations
|
||||
|
||||
|
||||
|
||||
Some of this goes against instincts I had a long time ago. For example, if you have a function that makes a database query, the interface looks simpler and nicer if the database connection handling is hidden inside the function, and the only parameters are the query parameters. However, when you build a software system out of functions like this, it actually becomes more complex to coordinate the database usage. Not only are the components doing things their own ways, they’re trying to hide what they’re doing as “implementation details”. The fact that a database query requires a database connection never was an implementation detail. If something can’t be hidden, it’s saner to make it explicit.
|
||||
|
||||
I’m wary of feeding the OOP and functional programming false dichotomy, but I think it’s interesting that FP goes to the opposite extreme of OOP: OOP tries to encapsulate things, including the essential complexity that can’t be encapsulated, while pure FP tends to make things explicit, including some accidental complexity. Most of the time, that’s the safer side to go wrong, but sometimes (such as when [building self-referential data structures in a purely functional language][5]) you can get designs that are more for the sake of FP than for the sake of simplicity (which is why [Haskell includes some escape hatches][6]). I’ve written before about [the middle ground of so-called “weak purity”][7].
|
||||
|
||||
Brian found that encapsulation works at a larger scale for a couple of reasons. One is that larger components are simply more likely to contain accidental state, just because of size. Another is that what’s “accidental” is relative to what problem you’re solving. From the chat app user’s point of view, “accidental complexity” is anything unrelated to messages and channels and users, etc. As you break the problems into subproblems, however, more things become essential. For example, the mapping between channel names and channel IDs is arguably accidental complexity when solving the “build a chat app” problem, but it’s essential complexity when solving the “implement the `getChannelIdByName()` function” subproblem. So, encapsulation tends to be less useful for subcomponents than supercomponents.
|
||||
|
||||
By the way, at the end of his video, Brian Will wonders if any language supports anonymous functions that _can’t_ access they scope they’re in. [D][8] does. Anonymous lambdas in D are normally closures, but anonymous stateless functions can also be declared if that’s what you want:
|
||||
|
||||
```
|
||||
import std.stdio;
|
||||
|
||||
void main()
|
||||
{
|
||||
int x = 41;
|
||||
|
||||
// Value from immediately executed lambda
|
||||
auto v1 = () {
|
||||
return x + 1;
|
||||
}();
|
||||
writeln(v1);
|
||||
|
||||
// Same thing
|
||||
auto v2 = delegate() {
|
||||
return x + 1;
|
||||
}();
|
||||
writeln(v2);
|
||||
|
||||
// Plain functions aren't closures
|
||||
auto v3 = function() {
|
||||
// Can't access x
|
||||
// Can't access any mutable global state either if also marked pure
|
||||
return 42;
|
||||
}();
|
||||
writeln(v3);
|
||||
}
|
||||
```
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://theartofmachinery.com/2019/10/13/oop_and_essential_state.html
|
||||
|
||||
作者:[Simon Arneaud][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://theartofmachinery.com
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://medium.com/@brianwill/object-oriented-programming-a-personal-disaster-1b044c2383ab
|
||||
[2]: https://www.youtube.com/watch?v=QM1iUe6IofM
|
||||
[3]: http://www.cs.nott.ac.uk/~pszcah/G51ISS/Documents/NoSilverBullet.html
|
||||
[4]: https://theartofmachinery.com/2017/06/25/compression_complexity_and_software.html
|
||||
[5]: https://wiki.haskell.org/Tying_the_Knot
|
||||
[6]: https://en.wikibooks.org/wiki/Haskell/Mutable_objects#The_ST_monad
|
||||
[7]: https://theartofmachinery.com/2016/03/28/dirtying_pure_functions_can_be_useful.html
|
||||
[8]: https://dlang.org
|
@ -0,0 +1,59 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Sugarizer: The Taste of Sugar on Any Device)
|
||||
[#]: via: (https://opensourceforu.com/2019/10/sugarizer-the-taste-of-sugar-on-any-device/)
|
||||
[#]: author: (Dr Anil Seth https://opensourceforu.com/author/anil-seth/)
|
||||
|
||||
Sugarizer: The Taste of Sugar on Any Device
|
||||
======
|
||||
|
||||
[![][1]][2]
|
||||
|
||||
_Sugar is a learning platform that was initially developed for the OLPC project. The Sugar Learning Environment can be downloaded and installed on any Linux-compatible hardware. Sugarizer mimics the UI of Sugar using HTML5 and CSS3._
|
||||
|
||||
The One Laptop Per Child (OLPC) project was launched less than 12 years ago. The goal of bringing down the cost of a laptop to US$ 100 was never really achieved. The project also did not turn out to be as much of a success as anticipated. However, the goal was not really about the laptop, but to educate as many children as possible.
|
||||
The interactive learning environment of the OLPC project was equally critical. This became a separate project under Sugar Labs, [_https://wiki.sugarlabs.org/_][3], and continues to be active. The Sugar Learning Environment is available as a Fedora spin, and can be downloaded and installed on any Linux-compatible hardware. It would be a good option to install it on an old system, which could then be donated. The US$ 90 Pinebook, [_https://www.pine64.org/,_][4] with Sugar installed on it would also make a memorable and useful gift.
|
||||
The Sugar Environment can happily coexist with other desktop environments on Linux. So, the computer does not have to be dedicated to Sugar. On Fedora, you may add it to your existing desktop as follows:
|
||||
|
||||
```
|
||||
$ sudo dnf group install ‘Sugar Desktop Environment’
|
||||
```
|
||||
|
||||
I have not tried it on Ubuntu. However, the following command should work:
|
||||
|
||||
```
|
||||
$ sudo apt install sucrose
|
||||
```
|
||||
|
||||
However, Sugar remains, by and large, an unknown entity. This is especially disappointing considering that the need to _learn to learn_ has never been greater.
|
||||
Hence, the release of Sugarizer is a pleasant surprise. It allows you to use the Sugar environment on any device, with the help of Web technologies. Sugarizer mimics the UI of Sugar using HTML5 and CSS3. It runs activities that have been written in HTML5/JavaScript. The current release includes a number of Sugar activities written initially in Python, which have been ported to HTML5/JavaScript.
|
||||
You may try the new release at _sugarizer.org_. Better still, install it from Google Play on your Android tablet or from App Store on an Apple device. It works well even on a two-year-old, low-end tablet. Hence, you may easily put your old tablet to good use by gifting it to a child after installing Sugarizer on it. In this way, you could even rationalise your desire to buy the replacement tablet you have been eyeing.
|
||||
|
||||
**Does it work?**
|
||||
My children are too old and grandchildren too young. Reason tells me that it should work. Experience also tells me that it will most likely NOT improve school grades. I did not like school. I was bored most of the time. If I was studying in today’s schools, I would have had ulcers or a nervous breakdown!
|
||||
When I think of schools, I recall the frustration of a child long ago (just 20 years) who got an answer wrong. The book and the teacher said that a mouse has two buttons. The mouse he used at home had three!
|
||||
So, can you risk leaving the education of children you care about to the schools? Think about the skills you may be using today. Could these have been taught at schools a mere five years ago?
|
||||
I never took JavaScript seriously and never made an effort to learn it. Today, I see Sugarizer and Snap! (a clone of Scratch in JavaScript) and am acutely aware of my foolishness. However, having learnt programming outside the classroom, I am confident that I can learn to program in JavaScript, should the need arise.
|
||||
The intention at the start was to write about the activities in Sugarizer and, maybe, explore the source code. My favourite activities include TamTam, Turtle Blocks, Maze, etc. From the food chain activity, I discovered that some animals that I had believed to be carnivores, were not. I have also seen children get excited by the Speak activity.
|
||||
However, once I started writing after the heading ‘Does it work?’, my mind took a radical turn. Now, I am convinced that Sugarizer will work only if you try it out.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensourceforu.com/2019/10/sugarizer-the-taste-of-sugar-on-any-device/
|
||||
|
||||
作者:[Dr Anil Seth][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://opensourceforu.com/author/anil-seth/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2017/05/Technology-Development-in-Computers-Innovation-eLearning-1.jpg?resize=696%2C696&ssl=1 (Technology Development in Computers (Innovation), eLearning)
|
||||
[2]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2017/05/Technology-Development-in-Computers-Innovation-eLearning-1.jpg?fit=900%2C900&ssl=1
|
||||
[3]: https://wiki.sugarlabs.org/
|
||||
[4]: https://www.pine64.org/,
|
@ -0,0 +1,188 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to make a Halloween lantern with Inkscape)
|
||||
[#]: via: (https://opensource.com/article/19/10/how-make-halloween-lantern-inkscape)
|
||||
[#]: author: (Jess Weichler https://opensource.com/users/cyanide-cupcake)
|
||||
|
||||
How to make a Halloween lantern with Inkscape
|
||||
======
|
||||
Use open source tools to make a spooky and fun decoration for your
|
||||
favorite Halloween haunt.
|
||||
![Halloween - backlit bat flying][1]
|
||||
|
||||
The spooky season is almost here! This year, decorate your haunt with a unique Halloween lantern made with open source!
|
||||
|
||||
Typically, a portion of a lantern's structure is opaque to block the light from within. What makes a lantern a lantern are the parts that are missing: windows cut from the structure so that light can escape. While it's impractical for lighting, a lantern with windows in spooky shapes and lurking silhouettes can be atmospheric and a lot of fun to create.
|
||||
|
||||
This article demonstrates how to create your own lantern using [Inkscape][2]. If you don't have Inkscape, you can install it from your software repository on Linux or download it from the [Inkscape website][3] on MacOS and Windows.
|
||||
|
||||
### Supplies
|
||||
|
||||
* Template ([A4][4] or [Letter][5] size)
|
||||
* Cardstock (black is traditional)
|
||||
* Tracing paper (optional)
|
||||
* Craft knife, ruler, and cutting mat (a craft cutting machine/laser cutter can be used instead)
|
||||
* Craft glue
|
||||
* LED tea-light "candle"
|
||||
_Safety note:_ Only use battery-operated candles for this project.
|
||||
|
||||
|
||||
|
||||
### Understanding the template
|
||||
|
||||
To begin, download the correct template for your region (A4 or Letter) from the links above and open it in Inkscape.
|
||||
|
||||
* * *
|
||||
|
||||
* * *
|
||||
|
||||
* * *
|
||||
|
||||
**![Lantern template screen][6]**
|
||||
|
||||
The gray-and-white checkerboard background is see-through (in technical terms, it's an _alpha channel_.)
|
||||
|
||||
The black base forms the lantern. Right now, there are no windows for light to shine through; the lantern is a solid black base. You will use the **Union** and **Difference** options in Inkscape to design the windows digitally.
|
||||
|
||||
The dotted blue lines represent fold scorelines. The solid orange lines represent guides. Windows for light should not be placed outside the orange boxes.
|
||||
|
||||
To the left of the template are a few pre-made objects you can use in your design.
|
||||
|
||||
### To create a window or shape
|
||||
|
||||
1. Create an object that looks like the window style you want. Objects can be created using any of the shape tools in Inkscape's left toolbar. Alternately, you can download Creative Commons- or Public Domain-licensed clipart and import the PNG file into your project.
|
||||
2. When you are happy with the shape of the object, turn it into a **Path** (rather than a **Shape**, which Inkscape sees as two different kinds of objects) by selecting **Object > Object to Path** in the top menu.
|
||||
|
||||
|
||||
|
||||
![Object to path menu][7]
|
||||
|
||||
3. Place the object on top of the base shape.
|
||||
4. Select both the object and the black base by clicking one, pressing and holding the Shift key, then selecting the other.
|
||||
5. Select **Object > Difference** from the top menu to remove the shape of the object from the base. This creates what will become a window in your lantern.
|
||||
|
||||
|
||||
|
||||
![Object > Difference menu][8]
|
||||
|
||||
### To add an object to a window
|
||||
|
||||
After making a window, you can add objects to it to create a scene.
|
||||
|
||||
**Tips:**
|
||||
|
||||
* All objects, including text, must be connected to the base of the lantern. If not, they will fall out after cutting and leave a blank space.
|
||||
* Avoid small, intricate details. These are difficult to cut, even when using a machine like a laser cutter or a craft plotter.
|
||||
|
||||
|
||||
1. Create or import an object.
|
||||
2. Place the object inside the window so that it is touching at least two sides of the base.
|
||||
3. With the object selected, choose **Object > Object to Path** from the top menu.
|
||||
|
||||
|
||||
|
||||
![Object to path menu][9]
|
||||
|
||||
4. Select the object and the black base by clicking on each one while holding the Shift key).
|
||||
5. Select **Object > Union** to join the object and the base.
|
||||
|
||||
|
||||
|
||||
### Add text
|
||||
|
||||
Text can either be cut out from the base to create a window (as I did with the stars) or added to a window (which blocks the light from within the lantern). If you're creating a window, only follow steps 1 and 2 below, then use **Difference** to remove the text from the base layer.
|
||||
|
||||
1. Select the Text tool from the left sidebar to create text. Thick, bold fonts work best.
|
||||
|
||||
![Text tool][10]
|
||||
|
||||
2. Select your text, then choose **Path > Object to Path** from the top menu. This converts the text object to a path. Note that this step means you can no longer edit the text, so perform this step _only after_ you're sure you have the word or words you want.
|
||||
|
||||
3. After you have converted the text, you can press **F2** on your keyboard to activate the **Node Editor** tool to clearly show the nodes of the text when it is selected with this tool.
|
||||
|
||||
|
||||
|
||||
|
||||
![Text selected with Node editor][11]
|
||||
|
||||
4. Ungroup the text.
|
||||
5. Adjust each letter so that it slightly overlaps its neighboring letter or the base.
|
||||
|
||||
|
||||
|
||||
![Overlapping the text][12]
|
||||
|
||||
6. To connect all of the letters to one another and to the base, re-select all the text and the base, then select **Path > Union**.
|
||||
|
||||
![Connecting letters and base with Path > Union][13]
|
||||
|
||||
|
||||
|
||||
|
||||
### Prepare for printing
|
||||
|
||||
The following instructions are for hand-cutting your lantern. If you're using a laser cutter or craft plotter, follow the techniques required by your hardware to prepare your files.
|
||||
|
||||
1. In the **Layer** panel, click the **Eye** icon beside the **Safety** layer to hide the safety lines. If you don't see the Layer panel, reveal it by selecting **Layer > Layers** from the top menu.
|
||||
2. Select the black base. In the **Fill and Stroke** panel, set the fill to **X** (meaning _no fill_) and the **Stroke** to solid black (that's #000000ff to fans of hexes).
|
||||
|
||||
|
||||
|
||||
![Setting fill and stroke][14]
|
||||
|
||||
3. Print your pattern with **File > Print**.
|
||||
|
||||
4. Using a craft knife and ruler, carefully cut around each black line. Lightly score the dotted blue lines, then fold.
|
||||
|
||||
![Cutting out the lantern][15]
|
||||
|
||||
5. To finish off the windows, cut tracing paper to the size of each window and glue it to the inside of the lantern.
|
||||
|
||||
![Adding tracing paper][16]
|
||||
|
||||
6. Glue the lantern together at the tabs.
|
||||
|
||||
7. Turn on a battery-powered LED candle and place it inside your lantern.
|
||||
|
||||
|
||||
|
||||
|
||||
![Completed lantern][17]
|
||||
|
||||
Now your lantern is complete and ready to light up your haunt. Happy Halloween!
|
||||
|
||||
How to make Halloween bottle labels with Inkscape, GIMP, and items around the house.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/10/how-make-halloween-lantern-inkscape
|
||||
|
||||
作者:[Jess Weichler][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/cyanide-cupcake
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/halloween_bag_bat_diy.jpg?itok=24M0lX25 (Halloween - backlit bat flying)
|
||||
[2]: https://opensource.com/article/18/1/inkscape-absolute-beginners
|
||||
[3]: http://inkscape.org
|
||||
[4]: https://www.dropbox.com/s/75qzjilg5ak2oj1/papercraft_lantern_A4_template.svg?dl=0
|
||||
[5]: https://www.dropbox.com/s/8fswdge49jwx91n/papercraft_lantern_letter_template%20.svg?dl=0
|
||||
[6]: https://opensource.com/sites/default/files/uploads/lanterntemplate_screen.png (Lantern template screen)
|
||||
[7]: https://opensource.com/sites/default/files/uploads/lantern1.png (Object to path menu)
|
||||
[8]: https://opensource.com/sites/default/files/uploads/lantern2.png (Object > Difference menu)
|
||||
[9]: https://opensource.com/sites/default/files/uploads/lantern3.png (Object to path menu)
|
||||
[10]: https://opensource.com/sites/default/files/uploads/lantern4.png (Text tool)
|
||||
[11]: https://opensource.com/sites/default/files/uploads/lantern5.png (Text selected with Node editor)
|
||||
[12]: https://opensource.com/sites/default/files/uploads/lantern6.png (Overlapping the text)
|
||||
[13]: https://opensource.com/sites/default/files/uploads/lantern7.png (Connecting letters and base with Path > Union)
|
||||
[14]: https://opensource.com/sites/default/files/uploads/lantern8.png (Setting fill and stroke)
|
||||
[15]: https://opensource.com/sites/default/files/uploads/lantern9.jpg (Cutting out the lantern)
|
||||
[16]: https://opensource.com/sites/default/files/uploads/lantern10.jpg (Adding tracing paper)
|
||||
[17]: https://opensource.com/sites/default/files/uploads/lantern11.jpg (Completed lantern)
|
@ -0,0 +1,48 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (My Linux story: I grew up on PC Magazine not candy)
|
||||
[#]: via: (https://opensource.com/article/19/10/linux-journey-newb-ninja)
|
||||
[#]: author: (Michael Zamot https://opensource.com/users/mzamot)
|
||||
|
||||
My Linux story: I grew up on PC Magazine not candy
|
||||
======
|
||||
This Linux story begins with a kid reading about Linux in issues of PC
|
||||
Magazine from his childhood home in Costa Rica. Today, he's a passionate
|
||||
member of the global Linux community.
|
||||
![The back of a kid head][1]
|
||||
|
||||
In 1998, the movie _Titanic_ was released, mobile phones were just a luxury, and pagers were still in use. This was also the year I got my first computer. I can remember the details as if it were yesterday: Pentium 133MHz and just 16MB of memory. Back in that time (while running nothing less than Windows 95), this was a good machine. I can still hear in my mind the old spinning hard drive noise when I powered that computer on, and see the Windows 95 flag. It never crossed my mind, though (especially as an 8-year-old kid), that I would dedicate every minute of my life to Linux and open source.
|
||||
|
||||
Being just a kid, I always asked my mom to buy me every issue of PC Magazine instead of candies. I never skipped a single issue, and all of those dusty old magazines are still there in Costa Rica. It was in these magazines that I discovered the essential technology that changed my life. An issue in the year 2000 talked extensively about Linux and the advantages of free and open-source software. That issue also included a review of one of the most popular Linux distributions back then: Corel Linux. Unfortunately, the disc was not included. Without internet at home, I was out of luck, but that issue still lit a spark within me.
|
||||
|
||||
In 2003, I asked my mom to take me to a Richard Stallman talk. I couldn’t believe he was in the country. I was the only kid in that room, and I was laser-focused on everything he was saying, though I didn’t understand anything about patents, licenses, or the jokes about him with an old hard drive over his head.
|
||||
|
||||
Despite my attempts, I couldn’t make Linux work on my computer. One rainy afternoon in the year 2003, with the heavy smell of recently brewed coffee, my best friend and I were able to get a local magazine with a two-disk bundle: Mandrake Linux 7.1 (if my memory doesn’t fail) on one and StarOffice on the other. My friend poured more coffee into our mugs while I inserted the Mandrake disk into the computer with my shaking, excited hands. Linux was finally running—the same Linux I had been obsessed with since I read about it 3 years earlier.
|
||||
|
||||
We were lucky enough to get broadband internet in 2006 (at the lightning speed of 128/64Kbps), so I was able to use an old Pentium II computer under my bed and run it 24x7 with Debian, Apache, and my own mail server (my personal server, I told myself). This old machine was my playground to experiment on and put into practice all of the knowledge and reading I had been doing (and also to make the electricity bill more expensive).
|
||||
|
||||
As soon as I discovered there were open source communities in the country, I started attending their meetings. Eventually, I was helping in their events, and not long after I was organizing and giving talks. We used to host two annual events for many years: Festival Latinoamericano de Software Libre (Latin American Free Software Installation Fest) and Software Freedom Day.
|
||||
|
||||
Thanks to what I learned from my reading, but more importantly from the people in these local communities that guided and mentored me, I was able to land my first Linux job in 2011, even without college. I kept growing from there, working for many companies and learning more about open source and Linux at each one. Eventually, I felt that I had an obligation (or a social debt) to give back to the community so that other people like the younger me could also learn. Not long after, I started teaching classes and meeting wonderful and passionate people, many of whom are now as devoted to Linux and open source as I am. I can definitely say: Mission accomplished!
|
||||
|
||||
Eventually, what I learned about open source, Linux, OpenStack, Docker, and every other technology I played with sent me overseas, allowing me to work (doesn’t feel like it) for the most amazing company I’ve ever worked for, doing what I love. Because of open source and Linux, I became a part of something bigger than me. I was a member of a community, and I experienced what I consider the most significant impact on my life: Meeting and learning from so many masterminds and amazing people that today I can call friends. Without them and these communities, I wouldn’t be the person I am today.
|
||||
|
||||
How could I know when I was 10 years old and reading a magazine that Linux and open source would connect me to the greatest people, and change my life forever?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/10/linux-journey-newb-ninja
|
||||
|
||||
作者:[Michael Zamot][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/mzamot
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/idea_innovation_kid_education.png?itok=3lRp6gFa (The back of a kid head)
|
@ -0,0 +1,81 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Use sshuttle to build a poor man’s VPN)
|
||||
[#]: via: (https://fedoramagazine.org/use-sshuttle-to-build-a-poor-mans-vpn/)
|
||||
[#]: author: (Paul W. Frields https://fedoramagazine.org/author/pfrields/)
|
||||
|
||||
Use sshuttle to build a poor man’s VPN
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
Nowadays, business networks often use a VPN (virtual private network) for [secure communications with workers][2]. However, the protocols used can sometimes make performance slow. If you can reach reach a host on the remote network with SSH, you could set up port forwarding. But this can be painful, especially if you need to work with many hosts on that network. Enter **sshuttle** — which lets you set up a quick and dirty VPN with just SSH access. Read on for more information on how to use it.
|
||||
|
||||
The sshuttle application was designed for exactly the kind of scenario described above. The only requirement on the remote side is that the host must have Python available. This is because sshuttle constructs and runs some Python source code to help transmit data.
|
||||
|
||||
### Installing sshuttle
|
||||
|
||||
The sshuttle application is packaged in the official repositories, so it’s easy to install. Open a terminal and use the following command [with sudo][3]:
|
||||
|
||||
```
|
||||
$ sudo dnf install sshuttle
|
||||
```
|
||||
|
||||
Once installed, you may find the manual page interesting:
|
||||
|
||||
```
|
||||
$ man sshuttle
|
||||
```
|
||||
|
||||
### Setting up the VPN
|
||||
|
||||
The simplest case is just to forward all traffic to the remote network. This isn’t necessarily a crazy idea, especially if you’re not on a trusted local network like your own home. Use the _-r_ switch with the SSH username and the remote host name:
|
||||
|
||||
```
|
||||
$ sshuttle -r username@remotehost 0.0.0.0/0
|
||||
```
|
||||
|
||||
However, you may want to restrict the VPN to specific subnets rather than all network traffic. (A complete discussion of subnets is outside the scope of this article, but you can read more [here on Wikipedia][4].) Let’s say your office internally uses the reserved Class A subnet 10.0.0.0 and the reserved Class B subnet 172.16.0.0. The command above becomes:
|
||||
|
||||
```
|
||||
$ sshuttle -r username@remotehost 10.0.0.0/8 172.16.0.0/16
|
||||
```
|
||||
|
||||
This works great for working with hosts on the remote network by IP address. But what if your office is a large network with lots of hosts? Names are probably much more convenient — maybe even required. Never fear, sshuttle can also forward DNS queries to the office with the _–dns_ switch:
|
||||
|
||||
```
|
||||
$ sshuttle --dns -r username@remotehost 10.0.0.0/8 172.16.0.0/16
|
||||
```
|
||||
|
||||
To run sshuttle like a daemon, add the _-D_ switch. This also will send log information to the systemd journal via its syslog compatibility.
|
||||
|
||||
Depending on the capabilities of your system and the remote system, you can use sshuttle for an IPv6 based VPN. You can also set up configuration files and integrate it with your system startup if desired. If you want to read even more about sshuttle and how it works, [check out the official documentation][5]. For a look at the code, [head over to the GitHub page][6].
|
||||
|
||||
* * *
|
||||
|
||||
_Photo by _[_Kurt Cotoaga_][7]_ on _[_Unsplash_][8]_._
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/use-sshuttle-to-build-a-poor-mans-vpn/
|
||||
|
||||
作者:[Paul W. Frields][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/pfrields/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2019/10/sshuttle-816x345.jpg
|
||||
[2]: https://en.wikipedia.org/wiki/Virtual_private_network
|
||||
[3]: https://fedoramagazine.org/howto-use-sudo/
|
||||
[4]: https://en.wikipedia.org/wiki/Subnetwork
|
||||
[5]: https://sshuttle.readthedocs.io/en/stable/index.html
|
||||
[6]: https://github.com/sshuttle/sshuttle
|
||||
[7]: https://unsplash.com/@kydroon?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
||||
[8]: https://unsplash.com/s/photos/shuttle?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
@ -0,0 +1,167 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (10 Ways to Customize Your Linux Desktop With GNOME Tweaks Tool)
|
||||
[#]: via: (https://itsfoss.com/gnome-tweak-tool/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
10 Ways to Customize Your Linux Desktop With GNOME Tweaks Tool
|
||||
======
|
||||
|
||||
![GNOME Tweak Tool Icon][1]
|
||||
|
||||
There are several ways you can tweak Ubuntu to customize its looks and behavior. The easiest way I find is by using the [GNOME Tweak tool][2]. It is also known as GNOME Tweaks or simply Tweaks.
|
||||
|
||||
I have mentioned it numerous time in my tutorials in the past. Here, I list all the major tweaks you can perform with this tool.
|
||||
|
||||
I have used Ubuntu here but the steps should be applicable to any Linux distribution using GNOME desktop environment.
|
||||
|
||||
### Install GNOME Tweak tool in Ubuntu 18.04 and other versions
|
||||
|
||||
Gnome Tweak tool is available in the [Universe repository in Ubuntu][3] so make sure that you have it enabled in your Software & Updates tool:
|
||||
|
||||
![Enable Universe Repository in Ubuntu][4]
|
||||
|
||||
After that, you can install GNOME Tweak tool from the software center. Just open the Software Center and search for GNOME Tweaks and install it from there:
|
||||
|
||||
![Install GNOME Tweaks Tool from Software Center][5]
|
||||
|
||||
Alternatively, you may also use command line to install software with [apt command][6]:
|
||||
|
||||
```
|
||||
sudo apt install gnome-tweaks
|
||||
```
|
||||
|
||||
### Customizing GNOME desktop with Tweaks tool
|
||||
|
||||
![][7]
|
||||
|
||||
GNOME Tweak tool enables you to do a number of settings changes. Some of these changes like wallpaper changes, startup applications etc are also available in the official System Settings tool. I am going to focus on tweaks that are not available in the Settings by default.
|
||||
|
||||
#### 1\. Change themes
|
||||
|
||||
You can [install new themes in Ubuntu][8] in various ways. But if you want to change to the newly installed theme, you’ll have to install GNOME Tweaks tool.
|
||||
|
||||
You can find the theme and icon settings in Appearance section. You can browse through the available themes and icons and set the ones you like. The changes take into effect immediately.
|
||||
|
||||
![Change Themes With GNOME Tweaks][9]
|
||||
|
||||
#### 2\. Disable animation to speed up your desktop
|
||||
|
||||
There are subtle animations for application window opening, closing, maximizing etc. You can disable these animations to speed up your system slightly as it will use slightly fewer resources.
|
||||
|
||||
![Disable Animations For Slightly Faster Desktop Experience][10]
|
||||
|
||||
#### 3\. Control desktop icons
|
||||
|
||||
At least in Ubuntu, you’ll see the Home and Trash icons on the desktop. If you don’t like, you can choose to disable it. You can also choose which icons will be displayed on the desktop.
|
||||
|
||||
![Control Desktop Icons in Ubuntu][11]
|
||||
|
||||
#### 4\. Manage GNOME extensions
|
||||
|
||||
I hope you are aware of [GNOME Extensions][12]. These are small ‘plugins’ for your desktop that extends the functionalities of the GNOME desktop. There are [plenty of GNOME extensions][13] that you can use to get CPU consumption in the top panel, get clipboard history etc.
|
||||
|
||||
I have written in detail about [installing and using GNOME extensions][14]. Here, I assume that you are already using them and if that’s the case, you can manage them from within GNOME Tweaks.
|
||||
|
||||
![Manage GNOME Extensions][15]
|
||||
|
||||
#### 5\. Change fonts and scaling factor
|
||||
|
||||
You can [install new fonts in Ubuntu][16] and apply the system wide font change using Tweaks tool. You can also change the scaling factor if you think the icons, text are way too small on your desktop.
|
||||
|
||||
![Change Fonts and Scaling Factor][17]
|
||||
|
||||
#### 6\. Control touchpad behavior like Disable touchpad while typing, Make right click on touchpad working
|
||||
|
||||
The GNOME Tweaks also allows you to disable touchpad while typing. This is useful if you type fast on a laptop. The bottom of your palm may touch the touchpad and the cursor moves away to an undesired location on the screen.
|
||||
|
||||
Automatically disabling touchpad while typing fixes this problem.
|
||||
|
||||
![Disable Touchpad While Typing][18]
|
||||
|
||||
You’ll also notice that [when you press the bottom right corner of your touchpad for right click, nothing happens][19]. There is nothing wrong with your touchpad. It’s a system settings that disables the right clicking this way for any touchpad that doesn’t have a real right click button (like the old Thinkpad laptops). Two finger click gives you the right click.
|
||||
|
||||
You can also get this back by choosing Area in under Mouse Click Simulation instead of Fingers.
|
||||
|
||||
![Fix Right Click Issue][20]
|
||||
|
||||
You may have to [restart Ubuntu][21] in order to take the changes in effect. If you are Emacs lover, you can also force keybindings from Emacs.
|
||||
|
||||
#### 7\. Change power settings
|
||||
|
||||
There is only one power settings here. It allows you to put your laptop in suspend mode when the lid is closed.
|
||||
|
||||
![Power Settings in GNOME Tweaks Tool][22]
|
||||
|
||||
#### 8\. Decide what’s displayed in the top panel
|
||||
|
||||
The top panel in your desktop gives shows a few important things. You have the calendar, network icon, system settings and the Activities option.
|
||||
|
||||
You can also [display battery percentage][23], add date along with day and time and show week numbers. You can also enable hot corners so that if you take your mouse to the top left corner of the screen, you’ll get the activities view with all the running applications.
|
||||
|
||||
![Top Panel Settings in GNOME Tweaks Tool][24]
|
||||
|
||||
If you have the mouse focus on an application window, you’ll notice that it’s menu is displayed in the top panel. If you don’t like it, you may toggle it off and then the application menu will be available on the application itself.
|
||||
|
||||
#### 9\. Configure application window
|
||||
|
||||
You can decide if maximize and minimize option (the buttons on the top right corner) will be shown in the application window. You may also change their positioning between left and right.
|
||||
|
||||
![Application Window Configuration][25]
|
||||
|
||||
There are some other configuration options as well. I don’t use them but feel free to explore them on your own.
|
||||
|
||||
#### 10\. Configure workspaces
|
||||
|
||||
GNOME Tweaks tool also allows you to configure a couple of things around workspaces.
|
||||
|
||||
![Configure Workspaces in Ubuntu][26]
|
||||
|
||||
**In the end…**
|
||||
|
||||
GNOME Tweaks tool is a must have utility for any GNOME user. It helps you configure looks and functionality of the desktop. I find it surprising that this tool is not even in Main repository of Ubuntu. In my opinion, it should be installed by default. Till then, you’ll have to install GNOME Tweak tool in Ubuntu manually.
|
||||
|
||||
If you find some hidden gem in GNOME Tweaks that hasn’t been discussed here, why not share it with the rest of us?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/gnome-tweak-tool/
|
||||
|
||||
作者:[Abhishek Prakash][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/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/10/gnome-tweak-tool-icon.png?ssl=1
|
||||
[2]: https://wiki.gnome.org/action/show/Apps/Tweaks?action=show&redirect=Apps%2FGnomeTweakTool
|
||||
[3]: https://itsfoss.com/ubuntu-repositories/
|
||||
[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/03/enable-repositories-ubuntu.png?ssl=1
|
||||
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/10/install-gnome-tweaks-tool.jpg?ssl=1
|
||||
[6]: https://itsfoss.com/apt-command-guide/
|
||||
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/10/customize-gnome-with-tweak-tool.jpg?ssl=1
|
||||
[8]: https://itsfoss.com/install-themes-ubuntu/
|
||||
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/10/change-theme-ubuntu-gnome.jpg?ssl=1
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/10/disable-animation-ubuntu-gnome.jpg?ssl=1
|
||||
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/10/desktop-icons-ubuntu.jpg?ssl=1
|
||||
[12]: https://extensions.gnome.org/
|
||||
[13]: https://itsfoss.com/best-gnome-extensions/
|
||||
[14]: https://itsfoss.com/gnome-shell-extensions/
|
||||
[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/10/manage-gnome-extension-tweaks-tool.jpg?ssl=1
|
||||
[16]: https://itsfoss.com/install-fonts-ubuntu/
|
||||
[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/10/change-fonts-ubuntu-gnome.jpg?ssl=1
|
||||
[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/10/disable-touchpad-while-typing-ubuntu.jpg?ssl=1
|
||||
[19]: https://itsfoss.com/fix-right-click-touchpad-ubuntu/
|
||||
[20]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/10/enable-right-click-ubuntu.jpg?ssl=1
|
||||
[21]: https://itsfoss.com/schedule-shutdown-ubuntu/
|
||||
[22]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/10/power-settings-gnome-tweaks-tool.jpg?ssl=1
|
||||
[23]: https://itsfoss.com/display-battery-ubuntu/
|
||||
[24]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/10/top-panel-settings-gnome-tweaks-tool.jpg?ssl=1
|
||||
[25]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/10/windows-configuration-ubuntu-gnome-tweaks.jpg?ssl=1
|
||||
[26]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/10/configure-workspaces-ubuntu.jpg?ssl=1
|
@ -0,0 +1,144 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (algzjh)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (4 Free and Open Source Alternatives to Adobe Photoshop)
|
||||
[#]: via: (https://itsfoss.com/open-source-photoshop-alternatives/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
4 Free and Open Source Alternatives to Adobe Photoshop
|
||||
======
|
||||
|
||||
_**Looking for a free Photoshop alternative? Here are some of the best free and open source software that you can use instead of Adobe Photoshop.**_
|
||||
|
||||
Adobe Photoshop is a premium image editing and design tool available for Windows and macOS. Undoubtedly, almost everyone knows about it. It’s that popular. Well, you can use Photoshop on Linux using Windows in a virtual machine or by [using Wine][1] – but that is not an ideal experience.
|
||||
|
||||
In general, we don’t have a lot of options available as a replacement for Adobe Photoshop. However, in this article, we shall mention some of the best open-source Photoshop alternatives available for Linux (with cross-platform support as well).
|
||||
|
||||
Do note that Photoshop is not just a photo editor. It’s used by photographers, digital artists, professional editors for various usage. The alternative software here may not have all the features of Photoshop but you can use them for various task that you do in Photoshop.
|
||||
|
||||
### Open Source Alternatives to Adobe Photoshop for Linux, Windows and macOS
|
||||
|
||||
![][2]
|
||||
|
||||
Initially, I thought of focusing only on Photoshop alternatives for Linux but why confine this list for Linux only? Other operating system users should also use the open source software.
|
||||
|
||||
_**If you are using Linux, all the mentioned software should be available in the repositories of your distribution. You can install it using the software center or the package manager.**_
|
||||
|
||||
For other platforms, please check the official project websites to get the installer files.
|
||||
|
||||
_The list is in no particular order of ranking_.
|
||||
|
||||
#### 1\. GIMP: The true Photoshop alternative
|
||||
|
||||
![][3]
|
||||
|
||||
Key Features:
|
||||
|
||||
* Customizable Interface
|
||||
* Digital Retouching
|
||||
* Photo Enhancement (using transform tools)
|
||||
* Wide range of hardware support (pressure-sensitive tablets, MIDIs, etc.)
|
||||
* Almost every major image file supported
|
||||
* Layer management support
|
||||
|
||||
|
||||
|
||||
**Platforms available for:** Linux, Windows and macOS
|
||||
|
||||
[GIMP][4] is my go-to tool for everything – no matter how basic/advanced the task is. Probably, this is the closest that you will get as a replacement for Photoshop on Linux. In addition to this, it is an open source and free solution for an artist looking to create great artwork on Linux.
|
||||
|
||||
It features all the necessary features for any kind of image manipulation. Of course, there’s layer management support. Depending on your experience level – the utilization will differ. So, if you are looking to make the most out of it, you should read the [documentation][5] and follow the [official tutorials][6].
|
||||
|
||||
#### 2\. Krita
|
||||
|
||||
![][7]
|
||||
|
||||
Key Features:
|
||||
|
||||
* Layer management support
|
||||
* Transformation tools
|
||||
* Variety of brushes/drawing tools
|
||||
|
||||
|
||||
|
||||
**Platforms available for:** Linux, Windows and macOS
|
||||
|
||||
[Krita][8] is an impressive open source tool for digital painting. The layer management support and the presence of transformation tools help makes it one of the Photoshop alternatives for basic editing tasks.
|
||||
|
||||
If you’re into sketching/drawing, this will help you a lot.
|
||||
|
||||
#### 3\. Darktable
|
||||
|
||||
![][9]
|
||||
|
||||
Key Features:
|
||||
|
||||
* Develop RAW images
|
||||
* Variety of Image formats supported
|
||||
* Several Image operation modules with blending operators
|
||||
|
||||
|
||||
|
||||
**Platforms available for**: Linux, Windows and macOS
|
||||
|
||||
[Darktable][10] is an open source photography workflow application made by photographers. It lets you manage your digital negatives in a database. From your collection, develop raw images and enhance them using the tools available.
|
||||
|
||||
Starting from the basic image editing tools to several image modules supporting blending operators, you will find a lot of things as you explore.
|
||||
|
||||
#### 4\. Inkscape
|
||||
|
||||
![][11]
|
||||
|
||||
Key Features:
|
||||
|
||||
* Tools for object creation (best for drawing/sketching)
|
||||
* Layer management support
|
||||
* Transformation tools for image manipulation
|
||||
* Color selector (RGB, HSL, CMYK, color wheel, CMS)
|
||||
* Support for all major file formats
|
||||
|
||||
|
||||
|
||||
**Platforms available for**: Linux, Windows and macOS
|
||||
|
||||
[Inkscape][12] is a quite popular open-source vector graphics editor used by many professionals. It provides flexible designing tools to help you create/manipulate beautiful artworks. It is technically a direct alternative to Adobe Illustrator – but it pulls off some tricks that can help you utilize this as a Photoshop alternative as well.
|
||||
|
||||
Similar to GIMP’s official resources, you can utilize [Inkscape’s tutorials][13] to make the most out of it.
|
||||
|
||||
**What’s the true Photoshop alternative in your opinion?**
|
||||
|
||||
It’s tough to offer the exact same features that Adobe Photoshop provides. However, if you follow the official documentations and resources, you can do a lot of great stuff using the above-mentioned Photoshop alternatives.
|
||||
|
||||
Adobe has a range of grpahics tools and we have [open source alternatives to entire Adobe Creative Suite][14]. You may check that out as well.
|
||||
|
||||
What do you think about the Photoshop alternatives that we mentioned here? Do you know about any better alternative that deserves the mention? Let us know about it in the comments below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/open-source-photoshop-alternatives/
|
||||
|
||||
作者:[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://itsfoss.com/install-latest-wine/
|
||||
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/10/open_source_photoshop_alternatives.png?ssl=1
|
||||
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/08/gimp-screenshot.jpg?ssl=1
|
||||
[4]: https://www.gimp.org/
|
||||
[5]: https://www.gimp.org/docs/
|
||||
[6]: https://www.gimp.org/tutorials/
|
||||
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/09/krita-paint.png?ssl=1
|
||||
[8]: https://krita.org/
|
||||
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/09/darktable.jpg?ssl=1
|
||||
[10]: https://www.darktable.org/
|
||||
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2017/12/inkscape-screenshot.jpg?ssl=1
|
||||
[12]: https://inkscape.org/
|
||||
[13]: https://inkscape.org/learn/
|
||||
[14]: https://itsfoss.com/adobe-alternatives-linux/
|
@ -0,0 +1,215 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Bash Script to Delete Files/Folders Older Than “X” Days in Linux)
|
||||
[#]: via: (https://www.2daygeek.com/bash-script-to-delete-files-folders-older-than-x-days-in-linux/)
|
||||
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
|
||||
|
||||
Bash Script to Delete Files/Folders Older Than “X” Days in Linux
|
||||
======
|
||||
|
||||
**[Disk Usage][1]** Monitoring tools are capable of alerting us when a given threshold is reached.
|
||||
|
||||
But they don’t have the ingenuity to fix the **[disk usage][2]** problem on their own.
|
||||
|
||||
Manual intervention is needed to solve the problem.
|
||||
|
||||
But if you want to fully automate this kind of activity, what you will do.
|
||||
|
||||
Yes, it can be done using the bash script.
|
||||
|
||||
This script prevents alerts from **[monitoring tool][3]** because we delete old log files before filling the disk space.
|
||||
|
||||
We have added many useful shell scripts in the past. If you want to check them out, go to the link below.
|
||||
|
||||
* **[How to automate day to day activities using shell scripts?][4]**
|
||||
|
||||
|
||||
|
||||
I’ve added two bash scripts to this article, which helps clear up old logs.
|
||||
|
||||
### 1) Bash Script to Delete a Folders Older Than “X” Days in Linux
|
||||
|
||||
We have a folder named **“/var/log/app/”** that contains 15 days of logs and we are going to delete 10 days old folders.
|
||||
|
||||
```
|
||||
$ ls -lh /var/log/app/
|
||||
|
||||
drwxrw-rw- 3 root root 24K Oct 1 23:52 app_log.01
|
||||
drwxrw-rw- 3 root root 24K Oct 2 23:52 app_log.02
|
||||
drwxrw-rw- 3 root root 24K Oct 3 23:52 app_log.03
|
||||
drwxrw-rw- 3 root root 24K Oct 4 23:52 app_log.04
|
||||
drwxrw-rw- 3 root root 24K Oct 5 23:52 app_log.05
|
||||
drwxrw-rw- 3 root root 24K Oct 6 23:54 app_log.06
|
||||
drwxrw-rw- 3 root root 24K Oct 7 23:53 app_log.07
|
||||
drwxrw-rw- 3 root root 24K Oct 8 23:51 app_log.08
|
||||
drwxrw-rw- 3 root root 24K Oct 9 23:52 app_log.09
|
||||
drwxrw-rw- 3 root root 24K Oct 10 23:52 app_log.10
|
||||
drwxrw-rw- 3 root root 24K Oct 11 23:52 app_log.11
|
||||
drwxrw-rw- 3 root root 24K Oct 12 23:52 app_log.12
|
||||
drwxrw-rw- 3 root root 24K Oct 13 23:52 app_log.13
|
||||
drwxrw-rw- 3 root root 24K Oct 14 23:52 app_log.14
|
||||
drwxrw-rw- 3 root root 24K Oct 15 23:52 app_log.15
|
||||
```
|
||||
|
||||
This script will delete 10 days old folders and send folder list via mail.
|
||||
|
||||
You can change the value **“-mtime X”** depending on your requirement. Also, replace your email id instead of us.
|
||||
|
||||
```
|
||||
# /opt/script/delete-old-folders.sh
|
||||
|
||||
#!/bin/bash
|
||||
prev_count=0
|
||||
fpath=/var/log/app/app_log.*
|
||||
find $fpath -type d -mtime +10 -exec ls -ltrh {} \; > /tmp/folder.out
|
||||
find $fpath -type d -mtime +10 -exec rm -rf {} \;
|
||||
count=$(cat /tmp/folder.out | wc -l)
|
||||
if [ "$prev_count" -lt "$count" ] ; then
|
||||
MESSAGE="/tmp/file1.out"
|
||||
TO="[email protected]"
|
||||
echo "Application log folders are deleted older than 15 days" >> $MESSAGE
|
||||
echo "+----------------------------------------------------+" >> $MESSAGE
|
||||
echo "" >> $MESSAGE
|
||||
cat /tmp/folder.out | awk '{print $6,$7,$9}' >> $MESSAGE
|
||||
echo "" >> $MESSAGE
|
||||
SUBJECT="WARNING: Apache log files are deleted older than 15 days $(date)"
|
||||
mail -s "$SUBJECT" "$TO" < $MESSAGE
|
||||
rm $MESSAGE /tmp/folder.out
|
||||
fi
|
||||
```
|
||||
|
||||
Set an executable permission to **“delete-old-folders.sh”** file.
|
||||
|
||||
```
|
||||
# chmod +x /opt/script/delete-old-folders.sh
|
||||
```
|
||||
|
||||
Finally add a **[cronjob][5]** to automate this. It runs daily at 7AM.
|
||||
|
||||
```
|
||||
# crontab -e
|
||||
|
||||
0 7 * * * /bin/bash /opt/script/delete-old-folders.sh
|
||||
```
|
||||
|
||||
You will get an output like the one below.
|
||||
|
||||
```
|
||||
Application log folders are deleted older than 20 days
|
||||
+--------------------------------------------------------+
|
||||
Oct 11 /var/log/app/app_log.11
|
||||
Oct 12 /var/log/app/app_log.12
|
||||
Oct 13 /var/log/app/app_log.13
|
||||
Oct 14 /var/log/app/app_log.14
|
||||
Oct 15 /var/log/app/app_log.15
|
||||
```
|
||||
|
||||
### 2) Bash Script to Delete a Files Older Than “X” Days in Linux
|
||||
|
||||
We have a folder named **“/var/log/apache/”** that contains 15 days of logs and we are going to delete 10 days old files.
|
||||
|
||||
The articles below are related to this topic, so you may be interested to read.
|
||||
|
||||
* **[How To Find And Delete Files Older Than “X” Days And “X” Hours In Linux?][6]**
|
||||
* **[How to Find Recently Modified Files/Folders in Linux][7]**
|
||||
* **[How To Automatically Delete Or Clean Up /tmp Folder Contents In Linux?][8]**
|
||||
|
||||
|
||||
|
||||
```
|
||||
# ls -lh /var/log/apache/
|
||||
|
||||
-rw-rw-rw- 3 root root 24K Oct 1 23:52 2daygeek_access.01
|
||||
-rw-rw-rw- 3 root root 24K Oct 2 23:52 2daygeek_access.02
|
||||
-rw-rw-rw- 3 root root 24K Oct 3 23:52 2daygeek_access.03
|
||||
-rw-rw-rw- 3 root root 24K Oct 4 23:52 2daygeek_access.04
|
||||
-rw-rw-rw- 3 root root 24K Oct 5 23:52 2daygeek_access.05
|
||||
-rw-rw-rw- 3 root root 24K Oct 6 23:54 2daygeek_access.06
|
||||
-rw-rw-rw- 3 root root 24K Oct 7 23:53 2daygeek_access.07
|
||||
-rw-rw-rw- 3 root root 24K Oct 8 23:51 2daygeek_access.08
|
||||
-rw-rw-rw- 3 root root 24K Oct 9 23:52 2daygeek_access.09
|
||||
-rw-rw-rw- 3 root root 24K Oct 10 23:52 2daygeek_access.10
|
||||
-rw-rw-rw- 3 root root 24K Oct 11 23:52 2daygeek_access.11
|
||||
-rw-rw-rw- 3 root root 24K Oct 12 23:52 2daygeek_access.12
|
||||
-rw-rw-rw- 3 root root 24K Oct 13 23:52 2daygeek_access.13
|
||||
-rw-rw-rw- 3 root root 24K Oct 14 23:52 2daygeek_access.14
|
||||
-rw-rw-rw- 3 root root 24K Oct 15 23:52 2daygeek_access.15
|
||||
```
|
||||
|
||||
This script will delete 10 days old files and send folder list via mail.
|
||||
|
||||
You can change the value **“-mtime X”** depending on your requirement. Also, replace your email id instead of us.
|
||||
|
||||
```
|
||||
# /opt/script/delete-old-files.sh
|
||||
|
||||
#!/bin/bash
|
||||
prev_count=0
|
||||
fpath=/var/log/apache/2daygeek_access.*
|
||||
find $fpath -type f -mtime +15 -exec ls -ltrd {} \; > /tmp/file.out
|
||||
find $fpath -type f -mtime +15 -exec rm -rf {} \;
|
||||
count=$(cat /tmp/file.out | wc -l)
|
||||
if [ "$prev_count" -lt "$count" ] ; then
|
||||
MESSAGE="/tmp/file1.out"
|
||||
TO="[email protected]"
|
||||
echo "Apache Access log files are deleted older than 20 days" >> $MESSAGE
|
||||
echo "+--------------------------------------------- +" >> $MESSAGE
|
||||
echo "" >> $MESSAGE
|
||||
cat /tmp/file.out | awk '{print $6,$7,$9}' >> $MESSAGE
|
||||
echo "" >> $MESSAGE
|
||||
SUBJECT="WARNING: Apache log folders are deleted older than 15 days $(date)"
|
||||
mail -s "$SUBJECT" "$TO" < $MESSAGE
|
||||
rm $MESSAGE /tmp/file.out
|
||||
fi
|
||||
```
|
||||
|
||||
Set an executable permission to **“delete-old-files.sh”** file.
|
||||
|
||||
```
|
||||
# chmod +x /opt/script/delete-old-files.sh
|
||||
```
|
||||
|
||||
Finally add a **[cronjob][5]** to automate this. It runs daily at 7AM.
|
||||
|
||||
```
|
||||
# crontab -e
|
||||
|
||||
0 7 * * * /bin/bash /opt/script/delete-old-folders.sh
|
||||
```
|
||||
|
||||
You will get an output like the one below.
|
||||
|
||||
```
|
||||
Apache Access log files are deleted older than 20 days
|
||||
+--------------------------------------------------------+
|
||||
Oct 11 /var/log/apache/2daygeek_access.11
|
||||
Oct 12 /var/log/apache/2daygeek_access.12
|
||||
Oct 13 /var/log/apache/2daygeek_access.13
|
||||
Oct 14 /var/log/apache/2daygeek_access.14
|
||||
Oct 15 /var/log/apache/2daygeek_access.15
|
||||
```
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.2daygeek.com/bash-script-to-delete-files-folders-older-than-x-days-in-linux/
|
||||
|
||||
作者:[Magesh Maruthamuthu][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.2daygeek.com/author/magesh/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.2daygeek.com/linux-check-disk-usage-files-and-directories-folders-size-du-command/
|
||||
[2]: https://www.2daygeek.com/linux-check-disk-space-usage-df-command/
|
||||
[3]: https://www.2daygeek.com/category/monitoring-tools/
|
||||
[4]: https://www.2daygeek.com/category/shell-script/
|
||||
[5]: https://www.2daygeek.com/crontab-cronjob-to-schedule-jobs-in-linux/
|
||||
[6]: https://www.2daygeek.com/how-to-find-and-delete-files-older-than-x-days-and-x-hours-in-linux/
|
||||
[7]: https://www.2daygeek.com/check-find-recently-modified-files-folders-linux/
|
||||
[8]: https://www.2daygeek.com/automatically-delete-clean-up-tmp-directory-folder-contents-in-linux/
|
@ -0,0 +1,235 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Formatting NFL data for doing data science with Python)
|
||||
[#]: via: (https://opensource.com/article/19/10/formatting-nfl-data-python)
|
||||
[#]: author: (Christa Hayes https://opensource.com/users/cdhayes2)
|
||||
|
||||
Formatting NFL data for doing data science with Python
|
||||
======
|
||||
In part 1 of this series on machine learning with Python, learn how to
|
||||
prepare a National Football League dataset for training.
|
||||
![A football field.][1]
|
||||
|
||||
No matter what medium of content you consume these days (podcasts, articles, tweets, etc.), you'll probably come across some reference to data. Whether it's to back up a talking point or put a meta-view on how data is everywhere, data and its analysis are in high demand.
|
||||
|
||||
As a programmer, I've found data science to be more comparable to wizardry than an exact science. I've coveted the ability to get ahold of raw data and glean something useful and concrete from it. What a useful talent!
|
||||
|
||||
This got me thinking about the difference between data scientists and programmers. Aren't data scientists just statisticians who can code? Look around and you'll see any number of tools aimed at helping developers become data scientists. AWS has a full-on [machine learning course][2] geared specifically towards turning developers into experts. [Visual Studio][3] has built-in Python projects that—with the click of a button—will create an entire template for classification problems. And scores of programmers are writing tools designed to make data science easier for anyone to pick up.
|
||||
|
||||
I thought I'd lean into the clear message of recruiting programmers to the data (or dark) side and give it a shot with a fun project: training a machine learning model to predict plays using a National Football League (NFL) dataset.
|
||||
|
||||
### Set up the environment
|
||||
|
||||
Before I can dig into the data, I need to set up my [virtual environment][4]. This is important because, without an environment, I'll have nowhere to work. Fortunately, Opensource.com has [some great resources][5] for installing and configuring the setup.
|
||||
|
||||
Any of the code you see here, I was able to look up through existing documentation. If there is one thing programmers are familiar with, it's navigating foreign (and sometimes very sparse) documentation.
|
||||
|
||||
### Get the data
|
||||
|
||||
As with any modern problem, the first step is to make sure you have quality data. Luckily, I came across a set of [NFL tracking data][6] from 2017 that was used for the NFL Big Data Bowl. Even the NFL is trying its best to attract the brightest stars in the data realm.
|
||||
|
||||
Everything I need to know about the schema is in the README. This exercise will train a machine learning model to predict run (in which the ball carrier keeps the football and runs downfield) and pass (in which the ball is passed to a receiving player) plays using the plays.csv [data file][7]. I won't use player tracking data in this exercise, but it could be fun to explore later.
|
||||
|
||||
First things first, I need to get access to my data by importing it into a dataframe. The [Pandas][8] library is an open source Python library that provides algorithms for easy analysis of data structures. The structure in the sample NFL data happens to be a two-dimensional array (or in simpler terms, a table), which data scientists often refer to as a dataframe. The Pandas function dealing with dataframes is [pandas.DataFrame][9]. I'll also import several other libraries that I will use later.
|
||||
|
||||
|
||||
```
|
||||
import pandas as pd
|
||||
import numpy as np
|
||||
import seaborn as sns
|
||||
import matplotlib.pyplot as plt
|
||||
import xgboost as xgb
|
||||
|
||||
from sklearn import metrics
|
||||
|
||||
df = pd.read_csv('data/plays.csv')
|
||||
|
||||
print(len(df))
|
||||
print(df.head())
|
||||
```
|
||||
|
||||
### Format the data
|
||||
|
||||
The NFL data dump does not explicitly indicate which plays are runs (also called rushes) and which are passes. Therefore, I have to classify the offensive play types through some football savvy and reasoning.
|
||||
|
||||
Right away, I can get rid of special teams plays in the **isSTPLAY** column. Special teams are neither offense nor defense, so they are irrelevant to my objective.
|
||||
|
||||
|
||||
```
|
||||
#drop st plays
|
||||
df = df[~df['isSTPlay']]
|
||||
print(len(df))
|
||||
```
|
||||
|
||||
Skimming the **playDescription** column, I see some plays where the quarterback kneels, which effectively ends a play. This is usually called a "victory formation" because the intent is to run out the clock. These are significantly different than normal running plays, so I can drop them as well.
|
||||
|
||||
|
||||
```
|
||||
#drop kneels
|
||||
df = df[~df['playDescription'].str.contains("kneels")]
|
||||
print (len(df))
|
||||
```
|
||||
|
||||
The data reports time in terms of the quarters in which a game is normally played (as well as the time on the game clock in each quarter). Is this the most intuitive in terms of trying to predict a sequence? One way to answer this is to consider how gameplay differs between time splits.
|
||||
|
||||
When a team has the ball with a minute left in the first quarter, will it act the same as if it has the ball with a minute left in the second quarter? Probably not. Will it act the same with a minute to go at the end of both halves? All else remaining equal, the answer is likely yes in most scenarios.
|
||||
|
||||
I'll convert the **quarter** and **GameClock** columns from quarters to halves, denoted in seconds rather than minutes. I'll also create a **half** column from the **quarter** values. There are some fifth quarter values, which I take to be overtime. Since overtime rules are different than normal gameplay, I can drop them.
|
||||
|
||||
|
||||
```
|
||||
#drop overtime
|
||||
df = df[~(df['quarter'] == 5)]
|
||||
print(len(df))
|
||||
|
||||
#convert time/quarters
|
||||
def translate_game_clock(row):
|
||||
raw_game_clock = row['GameClock']
|
||||
quarter = row['quarter']
|
||||
minutes, seconds_raw = raw_game_clock.partition(':')[::2]
|
||||
|
||||
seconds = seconds_raw.partition(':')[0]
|
||||
|
||||
total_seconds_left_in_quarter = int(seconds) + (int(minutes) * 60)
|
||||
|
||||
if quarter == 3 or quarter == 1:
|
||||
return total_seconds_left_in_quarter + 900
|
||||
elif quarter == 4 or quarter == 2:
|
||||
return total_seconds_left_in_quarter
|
||||
|
||||
if 'GameClock' in list (df.columns):
|
||||
df['secondsLeftInHalf'] = df.apply(translate_game_clock, axis=1)
|
||||
|
||||
if 'quarter' in list(df.columns):
|
||||
df['half'] = df['quarter'].map(lambda q: 2 if q > 2 else 1)
|
||||
```
|
||||
|
||||
The **yardlineNumber** column also needs to be transformed. The data currently lists the yard line as a value from one to 50. Again, this is unhelpful because a team would not act the same on its own 20-yard line vs. its opponent's 20-yard line. I will convert it to represent a value from one to 99, where the one-yard line is nearest the possession team's endzone, and the 99-yard line is nearest the opponent's end zone.
|
||||
|
||||
|
||||
```
|
||||
def yards_to_endzone(row):
|
||||
if row['possessionTeam'] == row['yardlineSide']:
|
||||
return 100 - row['yardlineNumber']
|
||||
else :
|
||||
return row['yardlineNumber']
|
||||
|
||||
df['yardsToEndzone'] = df.apply(yards_to_endzone, axis = 1)
|
||||
```
|
||||
|
||||
The personnel data would be extremely useful if I could get it into a format for the machine learning algorithm to take in. Personnel identifies the different types of skill positions on the field at a given time. The string value currently shown in **personnel.offense** is not conducive to input, so I'll convert each personnel position to its own column to indicate the number present on the field during the play. Defense personnel might be interesting to include later to see if it has any outcome on prediction. For now, I'll just stick with offense.
|
||||
|
||||
|
||||
```
|
||||
def transform_off_personnel(row):
|
||||
|
||||
rb_count = 0
|
||||
te_count = 0
|
||||
wr_count = 0
|
||||
ol_count = 0
|
||||
dl_count = 0
|
||||
db_count = 0
|
||||
|
||||
if not pd.isna(row['personnel.offense']):
|
||||
personnel = row['personnel.offense'].split(', ')
|
||||
for p in personnel:
|
||||
if p[2:4] == 'RB':
|
||||
rb_count = int(p[0])
|
||||
elif p[2:4] == 'TE':
|
||||
te_count = int(p[0])
|
||||
elif p[2:4] == 'WR':
|
||||
wr_count = int(p[0])
|
||||
elif p[2:4] == 'OL':
|
||||
ol_count = int(p[0])
|
||||
elif p[2:4] == 'DL':
|
||||
dl_count = int(p[0])
|
||||
elif p[2:4] == 'DB':
|
||||
db_count = int(p[0])
|
||||
|
||||
return pd.Series([rb_count,te_count,wr_count,ol_count,dl_count, db_count])
|
||||
|
||||
df[['rb_count','te_count','wr_count','ol_count','dl_count', 'db_count']] = df.apply(transform_off_personnel, axis=1)
|
||||
```
|
||||
|
||||
Now the offense personnel values are represented by individual columns.
|
||||
|
||||
![Result of reformatting offense personnel][10]
|
||||
|
||||
Formations describe how players are positioned on the field, and this is also something that would seemingly have value in predicting play outcomes. Once again, I'll convert the string values into integers.
|
||||
|
||||
|
||||
```
|
||||
df['offenseFormation'] = df['offenseFormation'].map(lambda f : 'EMPTY' if pd.isna(f) else f)
|
||||
|
||||
def formation(row):
|
||||
form = row['offenseFormation'].strip()
|
||||
if form == 'SHOTGUN':
|
||||
return 0
|
||||
elif form == 'SINGLEBACK':
|
||||
return 1
|
||||
elif form == 'EMPTY':
|
||||
return 2
|
||||
elif form == 'I_FORM':
|
||||
return 3
|
||||
elif form == 'PISTOL':
|
||||
return 4
|
||||
elif form == 'JUMBO':
|
||||
return 5
|
||||
elif form == 'WILDCAT':
|
||||
return 6
|
||||
elif form=='ACE':
|
||||
return 7
|
||||
else:
|
||||
return -1
|
||||
|
||||
df['numericFormation'] = df.apply(formation, axis=1)
|
||||
|
||||
print(df.yardlineNumber.unique())
|
||||
```
|
||||
|
||||
Finally, it's time to classify the play types. The **PassResult** column has four distinct values: I, C, S, and null, which represent Incomplete passing plays, Complete passing plays, Sacks (classified as passing plays), and a null value. Since I've already eliminated all special teams plays, I can assume the null values are running plays. So I'll convert the play outcome into a single column called **play_type** represented by either a 0 for running or a 1 for passing. This will be the column (or _label_, as the data scientists say) I want my algorithm to predict.
|
||||
|
||||
|
||||
```
|
||||
def play_type(row):
|
||||
if row['PassResult'] == 'I' or row['PassResult'] == 'C' or row['PassResult'] == 'S':
|
||||
return 'Passing'
|
||||
else:
|
||||
return 'Rushing'
|
||||
|
||||
df['play_type'] = df.apply(play_type, axis = 1)
|
||||
df['numericPlayType'] = df['play_type'].map(lambda p: 1 if p == 'Passing' else 0)
|
||||
```
|
||||
|
||||
### Take a break
|
||||
|
||||
Is it time to start predicting things yet? Most of my work so far has been trying to understand the data and what format it needs to be in—before I even get started on predicting anything. Anyone else need a minute?
|
||||
|
||||
In part two, I'll do some analysis and visualization of the data before feeding it into a machine learning algorithm, and then I'll score the model's results to see how accurate they are. Stay tuned!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/10/formatting-nfl-data-python
|
||||
|
||||
作者:[Christa Hayes][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/cdhayes2
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_LIFE_football__520x292.png?itok=5hPbxQF8 (A football field.)
|
||||
[2]: https://aws.amazon.com/training/learning-paths/machine-learning/developer/
|
||||
[3]: https://docs.microsoft.com/en-us/visualstudio/python/overview-of-python-tools-for-visual-studio?view=vs-2019
|
||||
[4]: https://opensource.com/article/19/9/get-started-data-science-python
|
||||
[5]: https://opensource.com/article/17/10/python-101
|
||||
[6]: https://github.com/nfl-football-ops/Big-Data-Bowl
|
||||
[7]: https://github.com/nfl-football-ops/Big-Data-Bowl/tree/master/Data
|
||||
[8]: https://pandas.pydata.org/
|
||||
[9]: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html
|
||||
[10]: https://opensource.com/sites/default/files/uploads/nfl-python-7_personneloffense.png (Result of reformatting offense personnel)
|
@ -0,0 +1,142 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Open source interior design with Sweet Home 3D)
|
||||
[#]: via: (https://opensource.com/article/19/10/interior-design-sweet-home-3d)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
Open source interior design with Sweet Home 3D
|
||||
======
|
||||
Try out furniture layouts, color schemes, and more in virtual reality
|
||||
before you go shopping in the real world.
|
||||
![Several houses][1]
|
||||
|
||||
There are three schools of thought on how to go about decorating a room:
|
||||
|
||||
1. Buy a bunch of furniture and cram it into the room
|
||||
2. Take careful measurements of each item of furniture, calculate the theoretical capacity of the room, then cram it all in, ignoring the fact that you've placed a bookshelf on top of your bed
|
||||
3. Use a computer for pre-visualization
|
||||
|
||||
|
||||
|
||||
Historically, I practiced the little-known fourth principle: don't have furniture. However, since I became a remote worker, I've found that a home office needs conveniences like a desk and a chair, a bookshelf for reference books and tech manuals, and so on. Therefore, I have been formulating a plan to populate my living and working space with actual furniture, made of actual wood rather than milk crates (or glue and sawdust, for that matter), with an emphasis on _plan_. The last thing I want is to bring home a great find from a garage sale to discover that it doesn't fit through the door or that it's oversized compared to another item of furniture.
|
||||
|
||||
It was time to do what the professionals do. It was time to pre-viz.
|
||||
|
||||
### Open source interior design
|
||||
|
||||
[Sweet Home 3D][2] is an open source (GPLv2) interior design application that helps you draw your home's floor plan and then define, resize, and arrange furniture. You can do all of this with precise measurements, down to fractions of a centimeter, without having to do any math and with the ease of basic drag-and-drop operations. And when you're done, you can view the results in 3D. If you can create a basic table (not the furniture kind) in a word processor, you can plan the interior design of your home in Sweet Home 3D.
|
||||
|
||||
### Installing
|
||||
|
||||
Sweet Home 3D is a [Java][3] application, so it's universal. It runs on any operating system that can run Java, which includes Linux, Windows, MacOS, and BSD. Regardless of your OS, you can [download][4] the application from the website.
|
||||
|
||||
* On Linux, [untar][5] the archive. Right-click on the SweetHome3D file and select **Properties**. In the **Permission** tab, grant the file executable permission.
|
||||
* On MacOS and Windows, expand the archive and launch the application. You must grant it permission to run on your system when prompted.
|
||||
|
||||
|
||||
|
||||
![Sweet Home 3D permissions][6]
|
||||
|
||||
On Linux, you can also install Sweet Home 3D as a Snap package, provided you have **snapd** installed and enabled.
|
||||
|
||||
### Measures of success
|
||||
|
||||
First thing first: Break out your measuring tape. To get the most out of Sweet Home 3D, you must know the actual dimensions of the living space you're planning for. You may or may not need to measure down to the millimeter or 16th of an inch; you know your own tolerance for variance. But you must get the basic dimensions, including measuring walls and windows and doors.
|
||||
|
||||
Use your best judgment for common sense. For instance, When measuring doors, include the door frame; while it's not technically part of the _door_ itself, it is part of the wall space that you probably don't want to cover with furniture.
|
||||
|
||||
![Measure twice, execute once][7]
|
||||
|
||||
CC-SA-BY opensource.com
|
||||
|
||||
### Creating a room
|
||||
|
||||
When you first launch Sweet Home 3D, it opens a blank canvas in its default viewing mode, a blueprint view in the top panel, and a 3D rendering in the bottom panel. On my [Slackware][8] desktop computer, this works famously, but my desktop is also my video editing and gaming computer, so it's got a great graphics card for 3D rendering. On my laptop, this view was a lot slower. For best performance (especially on a computer not dedicated to 3D rendering), go to the **3D View** menu at the top of the window and select **Virtual Visit**. This view mode renders your work from a ground-level point of view based on the position of a virtual visitor. That means you get to control what is rendered and when.
|
||||
|
||||
It makes sense to switch to this view regardless of your computer's power because an aerial 3D rendering doesn't provide you with much more detail than what you have in your blueprint plan. Once you have changed the view mode, you can start designing.
|
||||
|
||||
The first step is to define the walls of your home. This is done with the **Create Walls** tool, found to the right of the **Hand** icon in the top toolbar. Drawing walls is simple: Click where you want a wall to begin, click to anchor it, and continue until your room is complete.
|
||||
|
||||
![Drawing walls in Sweet Home 3D][9]
|
||||
|
||||
Once you close the walls, press **Esc** to exit the tool.
|
||||
|
||||
#### Defining a room
|
||||
|
||||
Sweet Home 3D is flexible on how you create walls. You can draw the outer boundary of your house first, and then subdivide the interior, or you can draw each room as conjoined "containers" that ultimately form the footprint of your house. This flexibility is possible because, in real life and in Sweet Home 3D, walls don't always define a room. To define a room, use the **Create Rooms** button to the right of the **Create Walls** button in the top toolbar.
|
||||
|
||||
If the room's floor space is defined by four walls, then all you need to do to define that enclosure as a room is double-click within the four walls. Sweet Home 3D defines the space as a room and provides you with its area in feet or meters, depending on your preference.
|
||||
|
||||
For irregular rooms, you must manually define each corner of the room with a click. Depending on the complexity of the room shape, you may have to experiment to find whether you need to work clockwise or counterclockwise from your origin point to avoid quirky Möbius-strip flooring. Generally, however, defining the floor space of a room is straightforward.
|
||||
|
||||
![Defining rooms in Sweet Home 3D][10]
|
||||
|
||||
After you give the room a floor, you can change to the **Arrow** tool and double-click on the room to give it a name. You can also set the color and texture of the flooring, walls, ceiling, and baseboards.
|
||||
|
||||
![Modifying room floors, ceilings, etc. in Sweet Home 3D][11]
|
||||
|
||||
None of this is rendered in your blueprint view by default. To enable room rendering in your blueprint panel, go to the **File** menu and select **Preferences**. In the **Preferences** panel, set **Room rendering in plan** to **Floor color or texture**.
|
||||
|
||||
### Doors and windows
|
||||
|
||||
Once you've finished the basic floor plan, you can switch permanently to the **Arrow** tool.
|
||||
|
||||
You can find doors and windows in the left column of Sweet Home 3D, in the **Doors and Windows** category. You have many choices, so choose whatever is closest to what you have in your home.
|
||||
|
||||
![Moving a door in Sweet Home 3D][12]
|
||||
|
||||
To place a door or window into your plan, drag-and-drop it on the appropriate wall in your blueprint panel. To adjust its position and size, double-click the door or window.
|
||||
|
||||
### Adding furniture
|
||||
|
||||
With the base plan complete, the part of the job that feels like _work_ is over! From this point onward, you can play with furniture arrangements and other décor.
|
||||
|
||||
You can find furniture in the left column, organized by the room for which each is intended. You can drag-and-drop any item into your blueprint plan and control orientation and size with the tools visible when you hover your mouse over the item's corners. Double-click on any item to adjust its color and finish.
|
||||
|
||||
### Visiting and exporting
|
||||
|
||||
To see what your future home will look like, drag the "person" icon in your blueprint view into a room.
|
||||
|
||||
![Sweet Home 3D rendering][13]
|
||||
|
||||
You can strike your own balance between realism and just getting a feel for space, but your imagination is your only limit. You can get additional assets to add to your home from the Sweet Home 3D [download page][4]. You can even create your own furniture and textures with the **Library Editor** applications, which are optional downloads from the project site.
|
||||
|
||||
Sweet Home 3D can export your blueprint plan to SVG format for use in [Inkscape][14], and it can export your 3D model to OBJ format for use in [Blender][15]. To export your blueprint, go to the **Plan** menu and select **Export to SVG format**. To export a 3D model, go to the **3D View** menu and select **Export to OBJ format**.
|
||||
|
||||
You can also take "snapshots" of your home so that you can refer to your ideas without opening Sweet Home 3D. To create a snapshot, go to the **3D View** menu and select **Create Photo**. The snapshot is rendered from the perspective of the person icon in the blueprint view, so adjust as required, then click the **Create** button in the **Create Photo** window. If you're happy with the photo, click **Save**.
|
||||
|
||||
### Home sweet home
|
||||
|
||||
There are many more features in Sweet Home 3D. You can add a sky and a lawn, position lights for your photos, set ceiling height, add another level to your house, and much more. Whether you're planning for a flat you're renting or a house you're buying—or a house that doesn't even exist (yet), Sweet Home 3D is an engaging and easy application that can entertain and help you make better purchasing choices when scurrying around for furniture, so you can finally stop eating breakfast at the kitchen counter and working while crouched on the floor.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/10/interior-design-sweet-home-3d
|
||||
|
||||
作者:[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/LIFE_housing.png?itok=s7i6pQL1 (Several houses)
|
||||
[2]: http://www.sweethome3d.com/
|
||||
[3]: https://opensource.com/resources/java
|
||||
[4]: http://www.sweethome3d.com/download.jsp
|
||||
[5]: https://opensource.com/article/17/7/how-unzip-targz-file
|
||||
[6]: https://opensource.com/sites/default/files/uploads/sweethome3d-permissions.png (Sweet Home 3D permissions)
|
||||
[7]: https://opensource.com/sites/default/files/images/life/sweethome3d-measure.jpg (Measure twice, execute once)
|
||||
[8]: http://www.slackware.com/
|
||||
[9]: https://opensource.com/sites/default/files/uploads/sweethome3d-walls.jpg (Drawing walls in Sweet Home 3D)
|
||||
[10]: https://opensource.com/sites/default/files/uploads/sweethome3d-rooms.jpg (Defining rooms in Sweet Home 3D)
|
||||
[11]: https://opensource.com/sites/default/files/uploads/sweethome3d-rooms-modify.jpg (Modifying room floors, ceilings, etc. in Sweet Home 3D)
|
||||
[12]: https://opensource.com/sites/default/files/uploads/sweethome3d-move.jpg (Moving a door in Sweet Home 3D)
|
||||
[13]: https://opensource.com/sites/default/files/uploads/sweethome3d-view.jpg (Sweet Home 3D rendering)
|
||||
[14]: http://inkscape.org
|
||||
[15]: http://blender.org
|
@ -0,0 +1,155 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Top 10 open source video players for Linux)
|
||||
[#]: via: (https://opensourceforu.com/2019/10/top-10-open-source-video-players-for-linux/)
|
||||
[#]: author: (Stella Aldridge https://opensourceforu.com/author/stella-aldridge/)
|
||||
|
||||
Linux 中的十大开源视频播放器
|
||||
======
|
||||
|
||||
[![][1]][2]
|
||||
|
||||
_选择合适的视频播放器有助于确保你获得最佳的观看体验,并为你提供[创建视频网站][3]的工具。你甚至可以根据个人喜好自定义正在观看的视频。_
|
||||
|
||||
因此,为了帮助你挑选适合你需求的最佳播放器,我们列出了 Linux 中十大开源播放器。
|
||||
|
||||
让我们来看看:
|
||||
|
||||
**1\. XBMC – Kodi 媒体中心**
|
||||
|
||||
这是一个灵活的跨平台播放器,核心使用 C++ 编写,并提供 Python 脚本作为附加组件。使用 Kodi 的好处包括:
|
||||
|
||||
* 提供超过 69 种语言版本
|
||||
* 用户可以从网络和本地存储播放音频、视频和媒体播放文件
|
||||
* 可与 JeOS 一起作为应用套件用于智能电视和机顶盒等设备
|
||||
* 有很多不错的附加组件,如视频和音频流插件、主题、屏幕保护程序等
|
||||
* 它支持多种格式,如 MPEG-1、2、4、RealVideo、HVC、HEVC 等
|
||||
|
||||
|
||||
|
||||
**2\. VLC 媒体播放器**
|
||||
|
||||
由于该播放器在一系列操作系统上具有令人印象深刻的功能和可用性,他在列表上是理所当然的。它使用 C、C++ 和 Objective C 编写,用户无需使用插件,这要归功于它对解码库的广泛支持。VLC 媒体播放器的优势包括:
|
||||
|
||||
* 在 Linux 上支持 DVD 播放器
|
||||
* 能够播放 .iso 文件
|
||||
* 能够播放高清录制的 D-VHS 磁带
|
||||
* 可以直接从 U 盘或外部驱动器运行
|
||||
* API 支持和浏览器支持(通过插件)
|
||||
|
||||
|
||||
|
||||
**3\. Bomi(CMPlayer)**
|
||||
|
||||
这个灵活和强大的播放器被许多普通用户选择,它的优势有:
|
||||
|
||||
* 易于使用的图形用户界面 (GUI)
|
||||
* 令人印象深刻的播放能力
|
||||
* 恢复播放的选项
|
||||
* 支持字幕,可以渲染多个字幕文件
|
||||
|
||||
|
||||
|
||||
**[![][4]][5]
|
||||
4\. Miro Music and Video Player**
|
||||
|
||||
以前被称为 Democracy Player (DTV), Miro 由分享文化基金会(Participatory Culture Foundation)重新开发,是一个不错的跨平台音频视频播放器。令人印象深刻,因为:
|
||||
|
||||
* 支持一些高清音频和视频
|
||||
* 提供超过 40 种语言版本
|
||||
* 可以播放多种文件格式,例如,QuickTime、WMV、MPEG 文件、音频视频接口 (AVI)、XVID
|
||||
* 一旦可用,可以自动通知用户并下载视频
|
||||
|
||||
|
||||
|
||||
**5\. SMPlayer**
|
||||
|
||||
这个跨平台的媒体播放器,只使用 C++ 的 Qt 库编写,它是一个强大的,多功能播放器。我们喜欢它,因为:
|
||||
|
||||
* 有多语言选择
|
||||
* 支持所有默认格式
|
||||
* 支持 EDL 文件,你可以配置从 Internet 获取的字幕
|
||||
* 可从互联网下载的各种皮肤
|
||||
* 倍速播放
|
||||
|
||||
|
||||
|
||||
**6\. MPV Player**
|
||||
|
||||
它用 C、Objective-C、Lua 和 Python 编写,免费、易于使用,并且有许多新功能,便于使用。主要加分是:
|
||||
|
||||
* 可以编译为一个库,公开客户端 API,从而增强控制
|
||||
* 允许媒体编码
|
||||
* 平滑运动
|
||||
|
||||
|
||||
|
||||
**7\. Deepin Movie**
|
||||
|
||||
此播放器是开源媒体播放器的一个极好的例子,它有很多优势,包括:
|
||||
|
||||
* 通过键盘完成所有播放操作
|
||||
* 各种格式的视频文件可以通过这个播放器轻松播放
|
||||
* 流媒体功能能让用户享受许多在线视频资源
|
||||
|
||||
|
||||
|
||||
**8\. Gnome Videos**
|
||||
|
||||
以前称为 Totem,这是 Gnome 桌面环境选择的播放器。
|
||||
完全用 C 编写,使用 GStreamer 多媒体框架构建,另外的版本(>2.7.1)使用 xine 作为后端。它是很棒的,因为:
|
||||
|
||||
它支持大量的格式,包括:
|
||||
|
||||
* Supports for direct video playback from Internet channels such as Apple
|
||||
* SHOUTcast、SMIL、M3U、Windows 媒体播放器格式等
|
||||
* 你可以在播放过程中调整灯光设置,如亮度和对比度
|
||||
* 加载 SubRip 字幕
|
||||
* 支持从互联网频道(如 Apple)直接播放视频
|
||||
|
||||
|
||||
|
||||
**9\. Xine Multimedia Player**
|
||||
|
||||
我们列表中用 C 编写的另外一个跨平台多媒体播放器。这是一个全能播放器,因为:
|
||||
|
||||
* 它支持物理媒体以及视频设备。3gp, Matroska(MKV)、 MOV, Mp4、音频格式,
|
||||
* 网络协议,V4L、DVB 和 PVR 等
|
||||
* 它可以手动校正音频和视频流的同步
|
||||
|
||||
|
||||
|
||||
**10\. ExMPlayer**
|
||||
|
||||
最后单同样重要的一个,ExMPlayer 是一个惊人的、强大的 MPlayer 的 GUI 前端。它的优点包括:
|
||||
|
||||
* 可以播放任何媒体格式
|
||||
* 支持网络流和字幕
|
||||
* 易于使用的音频转换器
|
||||
* 高品质的音频提取,而不会影响音质
|
||||
|
||||
|
||||
|
||||
上面的视频播放器在 Linux 上工作得很好。我们建议你尝试一下,选择一个最适合你的播放器。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensourceforu.com/2019/10/top-10-open-source-video-players-for-linux/
|
||||
|
||||
作者:[Stella Aldridge][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensourceforu.com/author/stella-aldridge/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i2.wp.com/opensourceforu.com/wp-content/uploads/2019/10/Depositphotos_50337841_l-2015.jpg?resize=696%2C585&ssl=1 (Depositphotos_50337841_l-2015)
|
||||
[2]: https://i2.wp.com/opensourceforu.com/wp-content/uploads/2019/10/Depositphotos_50337841_l-2015.jpg?fit=900%2C756&ssl=1
|
||||
[3]: https://www.ning.com/create-video-website/
|
||||
[4]: https://i2.wp.com/opensourceforu.com/wp-content/uploads/2019/10/Depositphotos_20380441_l-2015.jpg?resize=350%2C231&ssl=1
|
||||
[5]: https://i2.wp.com/opensourceforu.com/wp-content/uploads/2019/10/Depositphotos_20380441_l-2015.jpg?ssl=1
|
@ -1,141 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (tomjlw)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Guide to Install VMware Tools on Linux)
|
||||
[#]: via: (https://itsfoss.com/install-vmware-tools-linux)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
在 Linux 上安装 VMware 工具的教程
|
||||
======
|
||||
|
||||
**VMware 工具通过允许你分享剪贴板和文件夹以及其他东西来提升你的虚拟机体验。了解如何在 Ubuntu 和其它 Linux 发行版上安装 VMware 工具**
|
||||
|
||||
在先前的教程中,你学习了[在 Ubuntu 上安装 VMware 工作站][1]。你可以通过安装 VMware 工具进一步提升你的虚拟机功能。
|
||||
|
||||
如果你已经在 VMware 上安装了一个访客系统,你必须要注意 [VMware 工具][2]的要求-尽管并不完全清楚到底有什么要求。
|
||||
|
||||
在本文中,我们将要强调 VMware 工具的重要性,所提供的特性,以及在 Ubuntu 和其它 Linux 发行版上安装 VMware 工具的方法。
|
||||
|
||||
### VMware 工具:概览及特性
|
||||
|
||||
![在 Ubuntu 上安装 VMware 工具][3]在 Ubuntu 上安装 VMware 工具
|
||||
|
||||
出于显而易见的的理由,虚拟机(你的客机系统)将不会与主机上的表现完全一致。在其性能和操作上会有特定的限制。而那是为什么工具箱(VMware 工具)被引入的原因。
|
||||
|
||||
VMware 工具以一种高效的形式在提升了其性能的同时,帮助管理访客系统。
|
||||
|
||||
|
||||
#### VMware 工具到底负责什么?
|
||||
|
||||
![如何在在 Linux 上安装 VMware 工具][4]
|
||||
|
||||
你已大致了解它做什么了-但让我们探讨一下细节:
|
||||
|
||||
* 同步访客系统与主机系统间的时间以简化事务
|
||||
* 解锁从主机系统向客机系统传递消息的能力。比如说,你可以复制文字到剪贴板并将它轻松粘贴到你的客机系统。
|
||||
* 在客机系统启用声音
|
||||
* 提升视频分辨率
|
||||
* 修正错误网络速度数据
|
||||
* 减少不合适的色深
|
||||
|
||||
|
||||
|
||||
当你在客机系统上安装 VMware 工具时有重大改变。但是它到底包含什么特性以解锁/提升这些功能呢?然让我们来看看。。
|
||||
|
||||
#### VMware 工具:核心特性细节
|
||||
|
||||
![用 VMware 工具在主机系统与客机系统间分享剪切板][5]用 VMware 工具在主机系统与客机系统间分享剪切板
|
||||
|
||||
如果你不想知道它包含什么来启用这些功能的话,你可以跳过这部分。但是为了好奇的读者,让我们简短地讨论它一下:
|
||||
|
||||
**VMware 设备驱动:** 它真的取决于系统。大多数主流操作系统确实默认包括设备驱动。因此你不必另外安装它。这主要涉及-内存控制驱动,鼠标驱动,音频驱动,NIC 驱动,VGA 驱动以及其它。
|
||||
|
||||
**VMware 用户处理:** 这是事情变得十分有趣的地方。通过它你获得了在客机和主机间复制粘贴和拖拽的能力。你基本上可以从主机复制粘贴到虚拟机,反之亦然。
|
||||
|
||||
你同样也可以拖拽文件。此外,在你未安装 SVGA 驱动时它会启用指针释放/锁定。
|
||||
|
||||
**VMware工具生命周期管理:** 嗯我们会在下面看看如何安装 VMware 工具,但是这个特性帮你在虚拟机中轻松安装/升级 VMware 工具。
|
||||
|
||||
**分享文件夹**:除了这些。VMware 工具同样允许你在客机与主机系统间分享文件夹。
|
||||
|
||||
![使用 VMware 工具在客机与主机系统间分享文件][6]使用 VMware 工具在客机与主机系统间分享文件
|
||||
|
||||
当然,它的效果同样取决于客机系统。例如在 Windows 上你通过 Unity 模式在虚拟机上运行程序并从主机系统上操作它。
|
||||
|
||||
### 如何在 Ubuntu 和其它 Linux 发行版上安装 VMware 工具
|
||||
|
||||
**注意:** 对于 Linux 操作系统,你应该已经安装好了“Open VM 工具”,大多数情况下移除了额外安装 VMware 工具的需求。
|
||||
|
||||
大部分时候,当你安装了客机系统时,如果操纵系统支持 [Easy Install][7] 的话你会收到软件更新弹窗告诉你安装 VMware 工具。
|
||||
|
||||
Windows 和 Ubuntu 不支持 Esay Install。因此即使你使用 Windows 作为你的主机或尝试在 Ubuntu 上安装 VMware 工具,你应该有一个和弹窗消息差不多的选项来轻松安装 VMware 工具。这是它应该看起来的样子:
|
||||
|
||||
|
||||
![安装 VMware 工具的弹窗][8]安装 VMware 工具的弹窗
|
||||
|
||||
这是搞定它最简便的办法。因此当你配置虚拟机时确保你有一个通畅的网络连接。
|
||||
|
||||
如果你没收到任何弹窗-或者选项来轻松安装VMware 工具。你需要手动安装它。以下是如何去做:
|
||||
1\. 运行工作站播放器。
|
||||
2\. 从菜单导航至**虚拟机->安装 VMware 工具**。如果你已经安装了它并想修复安装,你会看到“**重新安装 VMware 工具**”这一选项出现。
|
||||
3\. 一旦你点击了,你就会看到一个虚拟 CD/DVD 挂载在客户系统上。
|
||||
4\. 打开并复制粘贴 **tar.gz** 文件到任何你选择的区域并解压,这里我们选择**桌面**。
|
||||
|
||||
![][9]
|
||||
|
||||
5\. 在解压后运行终端并通过输入以下命令导航至里面的文件夹:
|
||||
|
||||
```
|
||||
cd Desktop/VMwareTools-10.3.2-9925305/vmware-tools-distrib
|
||||
```
|
||||
|
||||
你需要检查文件夹与路径名-取决于版本与解压目的地-名字可能会改变。
|
||||
|
||||
![][10]
|
||||
|
||||
Replace **Desktop** with your storage location (such as cd Downloads) and the rest should remain the same if you are installing **10.3.2 version**.
|
||||
|
||||
6\. 现在仅需输入以下命令开始安装:
|
||||
|
||||
```
|
||||
sudo ./vmware-install.pl -d
|
||||
```
|
||||
|
||||
![][11]
|
||||
|
||||
你会被询问密码以获得安装权限,输入密码然后应当一切都搞定了。
|
||||
|
||||
到此为止了,你搞定了。这系列步骤应当适用于几乎大部分基于 Ubuntu 的客机系统。如果你想要在 Ubuntu 服务器上或其它系统安装 VMware 工具,步骤应该类似。
|
||||
|
||||
**总结**
|
||||
|
||||
在 Ubuntu Linux 上安装 VMware 工具应该挺简单。除了简单办法,我们也详述了手动安装的方法。如果你仍需帮助或者对安装有任何建议,在评论区评论让我们知道。
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
via: https://itsfoss.com/install-vmware-tools-linux
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[tomjlw](https://github.com/tomjlw)
|
||||
校对:[校对者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://itsfoss.com/install-vmware-player-ubuntu-1310/
|
||||
[2]: https://kb.vmware.com/s/article/340
|
||||
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools-downloading.jpg?fit=800%2C531&ssl=1
|
||||
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/install-vmware-tools-linux.png?resize=800%2C450&ssl=1
|
||||
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools-features.gif?resize=800%2C500&ssl=1
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools-shared-folder.jpg?fit=800%2C660&ssl=1
|
||||
[7]: https://docs.vmware.com/en/VMware-Workstation-Player-for-Linux/15.0/com.vmware.player.linux.using.doc/GUID-3F6B9D0E-6CFC-4627-B80B-9A68A5960F60.html
|
||||
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools.jpg?fit=800%2C481&ssl=1
|
||||
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools-extraction.jpg?fit=800%2C564&ssl=1
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools-folder.jpg?fit=800%2C487&ssl=1
|
||||
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmware-tools-installation-ubuntu.jpg?fit=800%2C492&ssl=1
|
@ -1,73 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Blockchain 2.0 – Introduction To Hyperledger Fabric [Part 10])
|
||||
[#]: via: (https://www.ostechnix.com/blockchain-2-0-introduction-to-hyperledger-fabric/)
|
||||
[#]: author: (sk https://www.ostechnix.com/author/sk/)
|
||||
|
||||
区块链 2.0:Hyperledger Fabric 介绍(十)
|
||||
======
|
||||
|
||||
![Hyperledger Fabric][1]
|
||||
|
||||
### Hyperledger Fabric
|
||||
|
||||
[Hyperledger 项目][2] 是一个伞形组织,具有许多正在开发的不同模块和系统。在这些子项目中,最受欢迎的是 “Hyperledger Fabric”。这篇博文将探讨一旦区块链系统开始大量使用到主流,将使 Fabric 在不久的将来几乎不可或缺的功能。最后,我们还将快速了解开发人员和爱好者们需要了解的有关 Hyperledger Fabric 技术的知识。
|
||||
|
||||
### 起始时间
|
||||
|
||||
按照 Hyperledger 项目的常规方式,Fabric 由其核心成员之一 IBM “捐赠”给该组织,而 IBM 以前是该组织的主要开发者。IBM 共享的这个技术平台在 Hyperledger 项目中进行了联合开发,来自 100 多个成员公司和机构为之做出了贡献。
|
||||
|
||||
目前,Fabric 正处于 LTS 版本的 v1.4,该版本已经发展很长一段路,并且被视为企业管理业务数据的解决方案。Hyperledger 项目的核心愿景也不可避免地渗透到了 Fabric 中。Hyperledger Fabric 系统继承了所有企业级的可扩展功能,这些功能已深深地刻入到 Hyperledger 组织下的所有项目中。
|
||||
|
||||
### Hyperledger Fabric 的亮点
|
||||
|
||||
Hyperledger Fabric 提供了多种功能和标准,这些功能和标准围绕支持快速开发和模块化体系结构的使命而构建。此外,与竞争对手(主要是瑞波和[以太坊][3])相比,Fabric 对封闭和[许可区块链][4]采取了明确的立场。它们的核心目标是开发一套工具,这些工具将帮助区块链开发人员创建定制的解决方案,而不是创建独立的生态系统或产品。
|
||||
|
||||
Hyperledger Fabric 的一些亮点如下:
|
||||
|
||||
#### 许可区块链系统
|
||||
|
||||
这是一个 Hyperledger Fabric 与其他平台(如以太坊和瑞波)差异很大的类别。默认情况下,Fabric 是一种旨在实现私有许可的区块链的工具。此类区块链不能被任何人访问,并且致力于达成共识或验证交易的节点由中央机构选择。这对于某些应用(例如银行和保险)可能很重要,在这些应用中,交易必须由中央机构而不是参与者来验证。
|
||||
|
||||
#### 机密和受控的信息流
|
||||
|
||||
Fabric 内置了权限系统,该权限系统将视情况限制特定组或某些个人中的信息流。与公有区块链不同,在公有区块链中,任何运行节点的人都可以对存储在区块链中的数据进行复制和选择性访问,而 Fabric 系统的管理员可以选择谁能访问共享信息,以及访问的方式。与现有竞争产品相比,它还有以更好的安全性标准对存储的数据进行加密的子系统。
|
||||
|
||||
#### 即插即用架构
|
||||
|
||||
Hyperledger Fabric 具有即插即用类型的体系结构。可以选择实施系统的各个组件,而开发人员看不到用处的系统组件可能会被废弃。Fabric 采取高度模块化和可定制的方式进行开发,而不是一种与其竞争对手采用的一种方法适应所有需求的方式。对于希望快速构建精益系统的公司和公司而言,这尤其有吸引力。这与 Fabric 与其它 Hyperledger 组件的互操作性相结合,意味着开发人员和设计人员现在可以使用各种标准化工具,而不必从其他来源提取代码并随后进行集成。 它还提供了一种相当可靠的方式来构建健壮的模块化系统。
|
||||
|
||||
#### 智能合约和链码
|
||||
|
||||
运行在区块链上的分布式应用程序称为[智能合约][5]。虽然智能合约这个术语或多或少与以太坊平台相关联,但<ruby>链码<rt>chaincode</rt></ruby>是在 Hyperledger 阵营中为其赋予的名称。链码应用程序除了拥有 DApps 中存在的所有优点之外,使 Hyperledger 与众不同的是,该应用程序的代码可以用多种高级编程语言编写。它本身支持 [Go][6] 和 JavaScript,并且在与适当的编译器模块集成后还支持许多其他语言。尽管这一事实在此时可能并不意味着什么,但这意味着,如果可以将现有人才用于正在进行的涉及区块链的项目,从长远来看,这有可能为公司节省数十亿美元的人员培训和管理费用。开发人员可以使用自己喜欢的语言进行编码,从而在 Hyperledger Fabric 上开始构建应用程序,而无需学习或培训平台特定的语言和语法。这提供了 Hyperledger Fabric 当前竞争对手无法提供的灵活性。
|
||||
|
||||
### 总结
|
||||
|
||||
* Hyperledger Fabric 是一个后端驱动程序平台,是一个主要针对需要区块链或其它分布式账本技术的集成项目。因此,除了次要的脚本功能外,它不提供任何面向用户的服务。(认可以为它更像是一种脚本语言。)
|
||||
* Hyperledger Fabric 支持针对特定用例构建侧链。如果开发人员希望将一组用户或参与者隔离到应用程序的特定部分或功能,则可以通过侧链来实现。侧链是衍生自主要父代的区块链,但在其初始块之后形成不同的链。产生新链的块将不受新链进一步变化的影响,即使将新信息添加到原始链中,新链也将保持不变。此功能将有助于扩展正在开发的平台,并引入用户特定和案例特定的处理功能。
|
||||
* 先前的功能还意味着并非所有用户都会像通常对公有链所期望的那样拥有区块链中所有数据的“精确”副本。参与节点将具有仅与之相关的数据副本。例如,假设一个类似于印度的 PayTM 的应用程序。该应用程序具有钱包功能以及电子商务功能。但是,并非所有的钱包用户都使用 PayTM 在线购物。在这种情况下,只有活跃的购物者将在 PayTM 电子商务网站上拥有相应的交易链,而钱包用户将仅拥有存储钱包交易的链的副本。这种灵活的数据存储和检索体系结构在扩展时非常重要,因为大量的单链区块链已经显示出会增加处理交易的前置时间。这样可以保持链的精简和分类。
|
||||
|
||||
我们将在以后的文章中详细介绍 Hyperledger Project 下的其他模块。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/blockchain-2-0-introduction-to-hyperledger-fabric/
|
||||
|
||||
作者:[sk][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://www.ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
|
||||
[2]: https://www.ostechnix.com/blockchain-2-0-an-introduction-to-hyperledger-project-hlp/
|
||||
[3]: https://www.ostechnix.com/blockchain-2-0-what-is-ethereum/
|
||||
[4]: https://www.ostechnix.com/blockchain-2-0-public-vs-private-blockchain-comparison/
|
||||
[5]: https://www.ostechnix.com/blockchain-2-0-explaining-smart-contracts-and-its-types/
|
||||
[6]: https://www.ostechnix.com/install-go-language-linux/
|
@ -0,0 +1,118 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Essential Accessories for Intel NUC Mini PC)
|
||||
[#]: via: (https://itsfoss.com/intel-nuc-essential-accessories/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
Intel NUC 迷你 PC 的基本配件
|
||||
======
|
||||
|
||||
几周前,我买了一台 [Intel NUC 迷你 PC][1]。我[在上面安装了 Linux][2],我非常享受。这个小巧的无风扇机器取代了台式机那庞大的 CPU。
|
||||
|
||||
Intel NUC 通常采用准系统形式,这意味着它没有任何内存、硬盘,也显然没有操作系统。许多[基于 Linux 的微型 PC][3] 定制化 Intel NUC 并添加磁盘、RAM 和操作系统将它出售给终端用户。
|
||||
|
||||
不用说,它不像大多数其他台式机那样带有键盘,鼠标或屏幕。
|
||||
|
||||
[Intel NUC][4] 是一款出色的设备,如果你要购买台式机,我强烈建议你购买它。如果你正在考虑购买 Intel NUC,你需要买一些配件,以便开始使用它。
|
||||
|
||||
### 基本的 Intel NUC 配件
|
||||
|
||||
![][5]
|
||||
|
||||
_文章中的 Amazon 链接是联盟链接。请阅读我们的[联盟政策][6]。_
|
||||
|
||||
#### 外围设备:显示器、键盘和鼠标
|
||||
|
||||
这很容易想到。你需要具有屏幕、键盘和鼠标才能使用计算机。你需要一台有 HDMI 连接的显示器和一个 USB 或无线键盘鼠标。如果你已经有了这些东西,那你可以继续。
|
||||
|
||||
如果你正在寻求建议,我建议购买 LG IPS LED 显示器。我有两台 22 英寸的型号,我对它提供的清晰视觉效果感到满意。
|
||||
|
||||
这些显示器有一个简单的固定支架。如果要使显示器可以上下移动并纵向旋转,请尝试使用 [HP EliteDisplay 显示器][7]。
|
||||
|
||||
![HP EliteDisplay Monitor][8]
|
||||
|
||||
我在多屏设置中同时连接了三台显示器。一台显示器连接到指定的 HDMI 端口。两台显示器通过[Club 3D 的 Thunderbolt 转 HDMI 分配器][9]连接到 Thunderbolt 端口。
|
||||
|
||||
你也可以选择超宽显示器。我对此没有亲身经历。
|
||||
|
||||
#### 交流电源线
|
||||
|
||||
当你拿到 NUC 时,你会惊讶地发现,尽管它有电源适配器,但它并没有插头。
|
||||
|
||||
![][10]
|
||||
|
||||
由于不同国家/地区的插头不同,因此英特尔决定将其从 NUC 套件中删除。我使用的是旧笔记本的电源线,但是如果你没有笔记本的电源线,那么很可能你需要自己准备一个。
|
||||
|
||||
#### 内存
|
||||
|
||||
Intel NUC 有两个内存插槽,最多可支持 32GB 内存。由于我的是 i3 核心处理器,因此我选择了 [Crucial 的 8GB DDR4 内存][11],价格约为 $33。
|
||||
|
||||
![][12]
|
||||
|
||||
8 GB 内存在大多数情况下都没问题,但是如果你的是 i7 核心处理器,那么可以选择 [16GB 内存][13],价格约为 $67。你可以加倍,以获得最大 32GB。选择全在于你。
|
||||
|
||||
#### 硬盘(重要)
|
||||
|
||||
Intel NUC 同时支持 2.5 英寸驱动器和 M.2 SSD,因此你可以同时使用两者以获得更多存储空间。
|
||||
|
||||
2.5 英寸插槽可同时容纳 SSD 和 HDD。我强烈建议选择 SSD,因为它比 HDD 快得多。[480GB 2.5寸][14]的价格是 $60。我认为这是一个合理的价格。
|
||||
|
||||
![][15]
|
||||
|
||||
2.5 英寸驱动器的标准 SATA 口速度为 6Gb/秒。根据你是否选择 NVMe SSD,M.2 插槽可能会更快。 NVMe(非易失性内存主机控制器接口规范)SSD 的速度比普通 SSD(也称为 SATA SSD)快 4 倍。但是它们可能也比 SATA M2 SSD 贵一些。
|
||||
|
||||
当购买 M.2 SSD 时,请检查产品图片。无论是 NVMe 还是 SATA SSD,都应在磁盘本身的图片中提到。你可以考虑使用[经济的三星 EVO NVMe M.2 SSD][16]。
|
||||
|
||||
![Make sure that your are buying the faster NVMe M2 SSD][17]
|
||||
|
||||
M.2 插槽和 2.5 英寸插槽中的 SATA SSD 具有相同的速度。这就是为什么如果你不想选择昂贵的 NVMe SSD,建议你选择 2.5 英寸 SATA SSD,并保留 M.2 插槽供以后升级。
|
||||
|
||||
#### 其他配套配件
|
||||
|
||||
你需要使用 HDMI 线缆连接显示器。如果你要购买新显示器,通常应会有一根线缆。
|
||||
|
||||
如果要使用 M.2 插槽,那么可能需要螺丝刀。Intel NUC 是一款出色的设备,你只需用手旋转四个脚即可拧开底部面板。你必须打开设备才能放置内存和磁盘。
|
||||
|
||||
![Intel NUC with Security Cable | Image Credit Intel][18]
|
||||
|
||||
NUC 还有防盗孔,可与防盗绳一起使用。在业务环境中,建议使用防盗绳保护计算机安全。购买[防盗绳几美元][19]便可节省数百美元。
|
||||
|
||||
**你使用什么配件?**
|
||||
|
||||
这些即使我在使用和建议使用的 Intel NUC 配件。你呢?如果你有一台 NUC,你会使用哪些配件并推荐给其他 NUC 用户?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/intel-nuc-essential-accessories/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.amazon.com/Intel-NUC-Mainstream-Kit-NUC8i3BEH/dp/B07GX4X4PW?psc=1&SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07GX4X4PW (barebone Intel NUC mini PC)
|
||||
[2]: https://itsfoss.com/install-linux-on-intel-nuc/
|
||||
[3]: https://itsfoss.com/linux-based-mini-pc/
|
||||
[4]: https://www.intel.in/content/www/in/en/products/boards-kits/nuc.html
|
||||
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/09/intel-nuc-accessories.png?ssl=1
|
||||
[6]: https://itsfoss.com/affiliate-policy/
|
||||
[7]: https://www.amazon.com/HP-EliteDisplay-21-5-Inch-1FH45AA-ABA/dp/B075L4VKQF?SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B075L4VKQF (HP EliteDisplay monitors)
|
||||
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/09/hp-elitedisplay-monitor.png?ssl=1
|
||||
[9]: https://www.amazon.com/Club3D-CSV-1546-USB-C-Multi-Monitor-Splitter/dp/B06Y2FX13G?SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B06Y2FX13G (thunderbolt to HDMI splitter from Club 3D)
|
||||
[10]: https://itsfoss.com/wp-content/uploads/2019/09/ac-power-cord-3-pongs.webp
|
||||
[11]: https://www.amazon.com/Crucial-Single-PC4-19200-SODIMM-260-Pin/dp/B01BIWKP58?psc=1&SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B01BIWKP58 (8GB DDR4 RAM from Crucial)
|
||||
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/09/crucial-ram.jpg?ssl=1
|
||||
[13]: https://www.amazon.com/Crucial-Single-PC4-19200-SODIMM-260-Pin/dp/B019FRBHZ0?psc=1&SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B019FRBHZ0 (16 GB RAM)
|
||||
[14]: https://www.amazon.com/Green-480GB-Internal-SSD-WDS480G2G0A/dp/B01M3POPK3?psc=1&SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B01M3POPK3 (480 GB 2.5)
|
||||
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/09/wd-green-ssd.png?ssl=1
|
||||
[16]: https://www.amazon.com/Samsung-970-EVO-500GB-MZ-V7E500BW/dp/B07BN4NJ2J?psc=1&SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07BN4NJ2J (Samsung EVO is a cost effective NVMe M.2 SSD)
|
||||
[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/09/samsung-evo-nvme.jpg?ssl=1
|
||||
[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/09/intel-nuc-security-cable.jpg?ssl=1
|
||||
[19]: https://www.amazon.com/Kensington-Combination-Laptops-Devices-K64673AM/dp/B005J7Y99W?psc=1&SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B005J7Y99W (few dollars in the security cable)
|
@ -1,126 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to Unzip a Zip File in Linux [Beginner’s Tutorial])
|
||||
[#]: via: (https://itsfoss.com/unzip-linux/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
如何在 linux 下解压 Zip 文件
|
||||
======
|
||||
|
||||
_**摘要: 将会向你展示如何在 ubuntu 和其他 linux 发行版本上解压文件 . 终端和图形界面的方法都会被讨论 **_
|
||||
|
||||
[Zip][1] 是一种最普通 , 最流行的方法来创建压缩存档文件 . 它也是一种古老的文件归档文件格式,创建于 1989 年 . 自从它被广泛的使用 , 你会经常遇见 zip 文件 .
|
||||
|
||||
在更早的一份教程 , 我展示了 [how to zip a folder in Linux][2] . 在这篇快速教程中 , 对于初学者我会展示如何在 linux 上解压文件 .
|
||||
|
||||
**先决条件: 检查你是否安装了 unzip**
|
||||
|
||||
为了解压 zip 归档文件 , 你必须解压安装包到你的系统 . 大多数现代的的 linux 发行版本提供解压 zip 文件的原生支持 . 校验它来避免以后出现坏的惊喜 .
|
||||
|
||||
以 [Unbutu][3] 和 [Debian][4] 为基础的发行版本 , 你能够使用下面的命令来安装 unzip. 如果你已经安装了, 你会被告知已经被安装 .
|
||||
|
||||
```
|
||||
sudo apt install unzip
|
||||
```
|
||||
|
||||
一旦你能够确认你的系统中安装了 unzip, 你就可以通过 unzip 来解压 zip 归档文件.
|
||||
|
||||
你也能够使用命令行或者图形工具来达到目的, 我会向你展示两种方法.
|
||||
|
||||
* [Unzip files in Linux terminal][5]
|
||||
* [Unzip files in Ubuntu via GUI][6]
|
||||
|
||||
|
||||
### 使用命令行解压文件
|
||||
|
||||
在 linux 下使用 unzip 命令是非常简单. 当你向解压 zip 文件, 用下面的命令:
|
||||
|
||||
```
|
||||
unzip zipped_file.zip
|
||||
```
|
||||
|
||||
你可以给 zip 文件提供解压路径而不是当前所在路径 . 你会在终端输出中看到提取的文件:
|
||||
|
||||
```
|
||||
unzip metallic-container.zip -d my_zip
|
||||
Archive: metallic-container.zip
|
||||
inflating: my_zip/625993-PNZP34-678.jpg
|
||||
inflating: my_zip/License free.txt
|
||||
inflating: my_zip/License premium.txt
|
||||
```
|
||||
|
||||
上面的命令有一个小问题. 它会提取 zip 文件中所有的内容到现在的文件夹 . 你会在当前文件夹下留下一堆没有组织的文件, 这不是一件很好的事情.
|
||||
|
||||
#### 解压到文件夹下
|
||||
|
||||
在 linux 命令行下, 对于把文件解压到一个文件夹下是一个好的做法. 这种方式下, 所有的提取文件都会被存储到你所指定的文件夹下. 如果文件夹不存在, 文件夹会被创建.
|
||||
|
||||
```
|
||||
unzip zipped_file.zip -d unzipped_directory
|
||||
```
|
||||
|
||||
现在 zipped_file.zip 中所有的内容都会被提取到 unzipped_directory 中.
|
||||
|
||||
从我们讨论好的做法, 另一个注意点, 我们可以查看压缩文件中的内容而不用真实的解压 .
|
||||
|
||||
#### 查看压缩文件中的内容而不解压压缩文件
|
||||
|
||||
```
|
||||
unzip -l zipped_file.zip
|
||||
```
|
||||
|
||||
下面是命令的输出:
|
||||
```
|
||||
unzip -l metallic-container.zip
|
||||
Archive: metallic-container.zip
|
||||
Length Date Time Name
|
||||
--------- ---------- ----- ----
|
||||
6576010 2019-03-07 10:30 625993-PNZP34-678.jpg
|
||||
1462 2019-03-07 13:39 License free.txt
|
||||
1116 2019-03-07 13:39 License premium.txt
|
||||
--------- -------
|
||||
6578588 3 files
|
||||
```
|
||||
|
||||
在 linux 下, 这里还有些其他的 unzip 的用法, 你对在 linux 下使用解压文件有了足够的知识.
|
||||
|
||||
### 使用图形界面来解压文件
|
||||
|
||||
如果你使用桌面版 linux , 那你就不必总是使用终端. 在图形化的界面下,我们又要如何解压文件呢? 我使用 [GNOME desktop][7]. 和其他的桌面版 linux 发行版本相同 .
|
||||
打开文件管理器,然后跳转到压缩文件所在的文件夹下. 点击鼠标右键, 你会在弹出的窗口中看到 "extract here",选择它.
|
||||
|
||||
![Unzip File in Ubuntu][8]
|
||||
|
||||
与 unzip 命令不同, 提取选项会创建一个和压缩文件名相同的文件夹,并且把压缩文件中的所有内容存储到创建的文件夹下. 相对于 unzip 命令的默认行为是将压缩文件提取到当前所在的文件下,图形界面的解压对于我来说是一件非常好的事情.
|
||||
|
||||
这里还有一个选项 "extract to", 你可以悬着特定的文件夹来存储提取文件.
|
||||
|
||||
你现在知道如何在 linux 解压文件. 你也许对学习有兴趣 [using 7zip in Linux][9] .
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/unzip-linux/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[octopus](https://github.com/singledo)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://en.wikipedia.org/wiki/Zip_(file_format)
|
||||
[2]: https://itsfoss.com/linux-zip-folder/
|
||||
[3]: https://ubuntu.com/
|
||||
[4]: https://www.debian.org/
|
||||
[5]: tmp.eqEocGssC8#terminal
|
||||
[6]: tmp.eqEocGssC8#gui
|
||||
[7]: https://gnome.org/
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/10/unzip-files-ubuntu.jpg?ssl=1
|
||||
[9]: https://itsfoss.com/use-7zip-ubuntu-linux/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user