diff --git a/published/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md b/published/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md new file mode 100644 index 0000000000..40f63a4c8d --- /dev/null +++ b/published/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md @@ -0,0 +1,28 @@ +Linux 4.3 内核增加了 MOST 驱动子系统 +================================================================================ +当 4.2 内核还没有正式发布的时候,Greg Kroah-Hartman 就为他维护的各种子系统模块打开了4.3 的合并窗口。 + +之前 Greg KH 发起的拉取请求(pull request)里包含了 linux 4.3 的合并窗口更新,内容涉及驱动核心、TTY/串口、USB 驱动、字符/杂项以及暂存区内容。这些拉取申请没有提供任何震撼性的改变,大部分都是改进/附加/修改bug。暂存区内容又是大量的修正和清理,但是还是有一个新的驱动子系统。 + +Greg 提到了[4.3 的暂存区改变][2],“这里的很多东西,几乎全部都是细小的修改和改变。通常的 IIO 更新和新驱动,以及我们已经添加了的 MOST 驱动子系统,已经在源码树里整理了。ozwpan 驱动最终还是被删掉,因为它很明显被废弃了而且也没有人关心它。” + +MOST 驱动子系统是面向媒体的系统传输(Media Oriented Systems Transport)的简称。在 linux 4.3 新增的文档里面解释道,“MOST 驱动支持 LInux 应用程序访问 MOST 网络:汽车信息骨干网(Automotive Information Backbone),高速汽车多媒体网络的事实上的标准。MOST 定义了必要的协议、硬件和软件层,提供高效且低消耗的传输控制,实时的数据包传输,而只需要使用一个媒介(物理层)。目前使用的媒介是光线、非屏蔽双绞线(UTP)和同轴电缆。MOST 也支持多种传输速度,最高支持150Mbps。”如文档解释的,MOST 主要是关于 Linux 在汽车上的应用。 + +当 Greg KH 发出了他为 Linux 4.3 多个子系统做出的更新,但是他还没有打算提交 [KDBUS][5] 的内核代码。他之前已经放出了 [linux 4.3 的 KDBUS] 的开发计划,所以我们将需要等待官方的4.3 合并窗口,看看会发生什么。 + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=news_item&px=Linux-4.3-Staging-Pull + +作者:[Michael Larabel][a] +译者:[oska874](https://github.com/oska874) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.michaellarabel.com/ +[1]:http://www.phoronix.com/scan.php?page=search&q=Linux+4.2 +[2]:http://lkml.iu.edu/hypermail/linux/kernel/1508.2/02604.html +[3]:http://www.phoronix.com/scan.php?page=news_item&px=KDBUS-Not-In-Linux-4.2 +[4]:http://www.phoronix.com/scan.php?page=news_item&px=Linux-4.2-rc7-Released +[5]:http://www.phoronix.com/scan.php?page=search&q=KDBUS diff --git a/translated/tech/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md b/published/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md similarity index 80% rename from translated/tech/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md rename to published/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md index 49850d831e..ae5ea004d4 100644 --- a/translated/tech/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md +++ b/published/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md @@ -1,10 +1,12 @@ 如何使用 GRUB 2 直接从硬盘运行 ISO 文件 ================================================================================  + 大多数 Linux 发行版都会提供一个可以从 USB 启动的 live 环境,以便用户无需安装即可测试系统。我们可以用它来评测这个发行版或仅仅是当成一个一次性系统,并且很容易将这些文件复制到一个 U 盘上,在某些情况下,我们可能需要经常运行同一个或不同的 ISO 镜像。GRUB 2 可以配置成直接从启动菜单运行一个 live 环境,而不需要烧录这些 ISO 到硬盘或 USB 设备。 ### 获取和检查可启动的 ISO 镜像 ### -为了获取 ISO 镜像,我们通常应该访问所需要的发行版的网站下载与我们架构兼容的镜像文件。如果这个镜像可以从 U 盘启动,那它也应该可以从 GRUB 菜单启动。 + +为了获取 ISO 镜像,我们通常应该访问所需的发行版的网站下载与我们架构兼容的镜像文件。如果这个镜像可以从 U 盘启动,那它也应该可以从 GRUB 菜单启动。 当镜像下载完后,我们应该通过 MD5 校验检查它的完整性。这会输出一大串数字与字母合成的序列。 @@ -13,13 +15,12 @@ 将这个序列与下载页提供的 MD5 校验码进行比较,两者应该完全相同。 ### 配置 GRUB 2 ### + ISO 镜像文件包含了整个系统。我们要做的仅仅是告诉 GRUB 2 哪里可以找到 kernel 和 initramdisk 或 initram 文件系统(这取决于我们所使用的发行版)。 -在下面的例子中,一个 Kubuntu 15.04 live 环境将被配置到 Ubuntu 14.04 盒子的 Grub 启动菜单项。这应该能在大多数新的以 Ubuntu 为基础的系统上运行。如果你是其他系统并且想实现一些其它的东西,你可以从[这些文件][1]获取灵感,但这会要求你拥有一点 GRUB 使用经验。 +在下面的例子中,一个 Kubuntu 15.04 live 环境将被配置到 Ubuntu 14.04 机器的 Grub 启动菜单项。这应该能在大多数新的以 Ubuntu 为基础的系统上运行。如果你是其它系统并且想实现一些其它的东西,你可以从[这些文件][1]了解更多细节,但这会要求你拥有一点 GRUB 使用经验。 -这个例子的文件 `kubuntu-15.04-desktop-amd64.iso` - -放在位于 `/dev/sda1` 的 `/home/maketecheasier/TempISOs/` 上. +这个例子的文件 `kubuntu-15.04-desktop-amd64.iso` 放在位于 `/dev/sda1` 的 `/home/maketecheasier/TempISOs/` 上。 为了使 GRUB 2 能正确找到它,我们应该编辑 @@ -39,7 +40,7 @@ ISO 镜像文件包含了整个系统。我们要做的仅仅是告诉 GRUB 2 ### 分析上述代码 ### -首先设置了一个变量名 `$menuentry` ,这是 ISO 文件的所在位置 。如果你想改变一个 ISO ,你应该修改 `isofile="/path/to/file/name-of-iso-file-.iso"`. +首先设置了一个变量名 `$menuentry` ,这是 ISO 文件的所在位置 。如果你想换一个 ISO ,你应该修改 `isofile="/path/to/file/name-of-iso-file-.iso"`. 下一行是指定回环设备,且必须给出正确的分区号码。 @@ -51,11 +52,11 @@ GRUB 的命名在这里稍微有点困惑,对于硬盘来说,它从 “0” 在 Linux 中第一块硬盘,第一个分区是 `/dev/sda1` ,但在 GRUB2 中则是 `hd0,1` 。第二块硬盘,第三个分区则是 `hd1,3`, 依此类推. -下一个重要的行是 +下一个重要的行是: linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash -这会载入内核镜像,在新的 Ubuntu Live CD 中,内核被存放在 `/casper` 目录,并且命名为 `vmlinuz.efi` 。如果你使用的是其它系统,可能会没有 `.efi` 扩展名或内核被存放在其它地方 (可以使用归档管理器打开 ISO 文件在 `/casper` 中查找确认)。最后一个选项, `quiet splash`, 是一个常规的 GRUB 选项无论你是否在意改动它们。 +这会载入内核镜像,在新的 Ubuntu Live CD 中,内核被存放在 `/casper` 目录,并且命名为 `vmlinuz.efi` 。如果你使用的是其它系统,可能会没有 `.efi` 扩展名或内核被存放在其它地方 (可以使用归档管理器打开 ISO 文件在 `/casper` 中查找确认)。最后一个选项, `quiet splash` ,是一个常规的 GRUB 选项,改不改无所谓。 最后 @@ -65,13 +66,13 @@ GRUB 的命名在这里稍微有点困惑,对于硬盘来说,它从 “0” ### 启动 live 系统 ### -做完上面所有的步骤后,需要更新 GRUB2 +做完上面所有的步骤后,需要更新 GRUB2: sudo update-grub  -当重启系统后,应该可以看见一个新的,并且允许我们启动刚刚配置的 ISO 镜像的 GRUB 条目 +当重启系统后,应该可以看见一个新的、并且允许我们启动刚刚配置的 ISO 镜像的 GRUB 条目:  @@ -83,7 +84,7 @@ via: https://www.maketecheasier.com/run-iso-files-hdd-grub2/ 作者:[Attila Orosz][a] 译者:[Locez](https://github.com/locez) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/published/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md b/published/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md new file mode 100644 index 0000000000..dae869445b --- /dev/null +++ b/published/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md @@ -0,0 +1,72 @@ +Linux 有问必答:如何在 Linux 命令行下浏览天气预报 +================================================================================ +> **Q**: 我经常在 Linux 桌面查看天气预报。然而,是否有一种在终端环境下,不通过桌面小插件或者浏览器查询天气预报的方法? + +对于 Linux 桌面用户来说,有很多办法获取天气预报,比如使用专门的天气应用、桌面小插件,或者面板小程序。但是如果你的工作环境是基于终端的,这里也有一些在命令行下获取天气的手段。 + +其中有一个就是 [wego][1],**一个终端下的小巧程序**。使用基于 ncurses 的接口,这个命令行程序允许你查看当前的天气情况和之后的预报。它也会通过一个天气预报的 API 收集接下来 5 天的天气预报。 + +### 在 Linux 下安装 wego ### + +安装 wego 相当简单。wego 是用 Go 编写的,引起第一个步骤就是安装 [Go 语言][2]。然后再安装 wego。 + + $ go get github.com/schachmat/wego + +wego 会被安装到 $GOPATH/bin,所以要将 $GOPATH/bin 添加到 $PATH 环境变量。 + + $ echo 'export PATH="$PATH:$GOPATH/bin"' >> ~/.bashrc + $ source ~/.bashrc + +现在就可与直接从命令行启动 wego 了。 + + $ wego + +第一次运行 weg 会生成一个配置文件(`~/.wegorc`),你需要指定一个天气 API key。 +你可以从 [worldweatheronline.com][3] 获取一个免费的 API key。免费注册和使用。你只需要提供一个有效的邮箱地址。 + + + +你的 .wegorc 配置文件看起来会这样: + + + +除了 API key,你还可以把你想要查询天气的地方、使用的城市/国家名称、语言配置在 `~/.wegorc` 中。 +注意,这个天气 API 的使用有限制:每秒最多 5 次查询,每天最多 250 次查询。 +当你重新执行 wego 命令,你将会看到最新的天气预报(当然是你的指定地方),如下显示。 + + + +显示出来的天气信息包括:(1)温度,(2)风速和风向,(3)可视距离,(4)降水量和降水概率 +默认情况下会显示3 天的天气预报。如果要进行修改,可以通过参数改变天气范围(最多5天),比如要查看 5 天的天气预报: + + $ wego 5 + +如果你想检查另一个地方的天气,只需要提供城市名即可: + + $ wego Seattle + +### 问题解决 ### + +1. 可能会遇到下面的错误: + + user: Current not implemented on linux/amd64 + + 当你在一个不支持原生 Go 编译器的环境下运行 wego 时就会出现这个错误。在这种情况下你只需要使用 gccgo ——一个 Go 的编译器前端来编译程序即可。这一步可以通过下面的命令完成。 + + $ sudo yum install gcc-go + $ go get -compiler=gccgo github.com/schachmat/wego + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/weather-forecasts-command-line-linux.html + +作者:[Dan Nanni][a] +译者:[oska874](https://github.com/oska874) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:https://github.com/schachmat/wego +[2]:http://ask.xmodulo.com/install-go-language-linux.html +[3]:https://developer.worldweatheronline.com/auth/register diff --git a/translated/share/20151007 Open Source Media Player MPlayer 1.2 Released.md b/published/20151007 Open Source Media Player MPlayer 1.2 Released.md similarity index 88% rename from translated/share/20151007 Open Source Media Player MPlayer 1.2 Released.md rename to published/20151007 Open Source Media Player MPlayer 1.2 Released.md index 622adebd61..95a777e6f1 100644 --- a/translated/share/20151007 Open Source Media Player MPlayer 1.2 Released.md +++ b/published/20151007 Open Source Media Player MPlayer 1.2 Released.md @@ -4,7 +4,7 @@ 在 [MPlayer][1] 1.1 发布将近3年后,新版 MPlayer 终于在上周发布了。在新版本 MPlayer 1.2 中带来了对许多新编码的解码支持。 -MPlayer 是一款跨平台的开源媒体播放器。它的名字是“Movie Player”的缩写。MPlayer 已经成为 Linux 上最老牌的媒体播放器之一,在过去的15年里,它还启发了许多其他媒体播放器。著名的基于 MPlayer 的媒体播放器有: +MPlayer 是一款跨平台的开源媒体播放器。它的名字是“Movie Player”的缩写。MPlayer 是 Linux 上最老牌的媒体播放器之一,在过去的15年里,它还带动出现了许多其他媒体播放器。著名的基于 MPlayer 的媒体播放器有: - [MPV][2] - SMPlayer @@ -30,19 +30,14 @@ MPlayer 是一款跨平台的开源媒体播放器。它的名字是“Movie Pla 打开一个终端,运行下列命令: wget http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.2.tar.xz - tar xvf MPlayer-1.1.1.tar.xz - cd MPlayer-1.2 - sudo apt-get install yasm - ./configure 在你运行 make 的时候,在你的终端屏幕上会显示一些东西,并且你需要一些时间来编译它。保持耐心。 make - sudo make install 如果你觉得从源码编译不大习惯的话,我建议你等待 MPlayer 1.2 提交到你的 Linux 发行版仓库中,或者用其它的播放器替代,比如 MPV。 @@ -53,7 +48,7 @@ via: http://itsfoss.com/mplayer-1-2-released/ 作者:[Abhishek][a] 译者:[alim0x](https://github.com/alim0x) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20151007 Productivity Tools And Tips For Linux.md b/published/20151007 Productivity Tools And Tips For Linux.md similarity index 85% rename from translated/tech/20151007 Productivity Tools And Tips For Linux.md rename to published/20151007 Productivity Tools And Tips For Linux.md index a3245013fa..3bc56cc9f6 100644 --- a/translated/tech/20151007 Productivity Tools And Tips For Linux.md +++ b/published/20151007 Productivity Tools And Tips For Linux.md @@ -1,4 +1,4 @@ -Linux产能工具及其使用技巧 +Linux 产能工具及其使用技巧 ================================================================================  @@ -6,7 +6,7 @@ Linux产能工具及其使用技巧 ### Linux产能工具及其使用技巧 ### -再次说明,我在写下本文时正在使用的是Ubuntu。但是,我将要在这里展示给大家产能工具及其使用技巧却适用于外面的大多数Linux发行版。 +再次说明,我在写下本文时正在使用的是Ubuntu。但是,我将要在这里展示给大家产能工具及其使用技巧却适用于市面上的大多数Linux发行版。 #### 外界的音乐 #### @@ -36,14 +36,14 @@ Ctrl+ C和Ctrl+V是我们日常计算机生活中不可缺少的一部分,它 如果你正忙着处理其它事情,而此时一个桌面通知闪了出来又逐渐消失了,你会怎么做?你会想要看看通知都说了什么,不是吗?最近通知指示器就是用于处理此项工作,它会保留一个最近所有通知的历史记录。这样,你就永远不会错过桌面通知了。 -你可以阅读[最近通知指示器这里][13]。 +你可以在此阅读[最近通知指示器][13]。 #### 终端技巧 #### 不,我不打算给你们展示所有那些Linux命令技巧和快捷方法,那会写满整个博客了。我打算给你们展示一些终端黑技巧,你可以用它们来提高你的生产力。 - **修改**sudo**密码超时**:默认情况下,sudo命令要求你在15分钟后再次输入密码,这真是让人讨厌。实际上,你可以修改默认的sudo密码超时。[此教程][14]会给你展示如何来实现。 -- **获取命令完成的桌面通知**:这是IT朋友们之间的一个常见的玩笑,开发者们花费大量时间来等待程序编译完成,而这不完全是正确的。但是,它确实影响到了生产力,因为在你等待程序编译完成时,你可以做其它事情,并忘了你在终端中运行的命令。一个更好的途径,就是在一个命令完成时,让它显示桌面通知。这样,你就不会长时间被打断,并且可以回到之前想要做的事情上。请阅读[如何获取命令完成的桌面通知][15]。 +- **获取命令完成的桌面通知**:这是IT朋友们之间的一个常见的玩笑——开发者们花费大量时间来等待程序编译完成——然而这不完全是正确的。但是,它确实影响到了生产力,因为在你等待程序编译完成时,你可以做其它事情,并忘了你在终端中运行的命令。一个更好的途径,就是在一个命令完成时,让它显示桌面通知。这样,你就不会长时间被打断,并且可以回到之前想要做的事情上。请阅读[如何获取命令完成的桌面通知][15]。 我知道,这不是一篇全面涵盖了**提升生产力**的文章。但是,这些小应用和小技巧可以在实际生活中帮助你在你宝贵的时间中做得更多。 @@ -55,20 +55,20 @@ via: http://itsfoss.com/productivity-tips-ubuntu/ 作者:[Abhishek][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://itsfoss.com/author/abhishek/ [1]:http://www.helpscout.net/blog/music-productivity/ -[2]:http://itsfoss.com/ambient-noise-music-player-ubuntu/ +[2]:https://linux.cn/article-5233-1.html [3]:http://www.noisli.com/ [4]:https://en.wikipedia.org/wiki/Pomodoro_Technique [5]:http://manuel-kehl.de/projects/go-for-it/ [6]:http://todotxt.com/ -[7]:http://itsfoss.com/go-for-it-to-do-app-in-linux/ +[7]:https://linux.cn/article-5337-1.html [8]:http://itsfoss.com/indicator-stickynotes-windows-like-sticky-note-app-for-ubuntu/ -[9]:http://itsfoss.com/install-google-keep-ubuntu-1310/ +[9]:https://linux.cn/article-2634-1.html [10]:https://evernote.com/ [11]:http://itsfoss.com/5-evernote-alternatives-linux/ [12]:https://esite.ch/tag/diodon/ diff --git a/sources/share/20151012 What is a good IDE for R on Linux.md b/sources/share/20151012 What is a good IDE for R on Linux.md index fa0af9f921..8079396b50 100644 --- a/sources/share/20151012 What is a good IDE for R on Linux.md +++ b/sources/share/20151012 What is a good IDE for R on Linux.md @@ -1,3 +1,5 @@ +FSSlc translating + What is a good IDE for R on Linux ================================================================================ Some time ago, I covered some of the [best IDEs for C/C++][1] on Linux. Obviously C and C++ are not the only programming languages out there, and it is time to turn to something a bit more specific. @@ -58,4 +60,4 @@ via: http://xmodulo.com/good-ide-for-r-on-linux.html [5]:http://www.vim.org/scripts/script.php?script_id=2628 [6]:http://www.lepem.ufc.br/jaa/r-plugin.html [7]:http://rgedit.sourceforge.net/ -[8]:https://rkward.kde.org/ \ No newline at end of file +[8]:https://rkward.kde.org/ diff --git a/sources/talk/20150716 Interview--Larry Wall.md b/sources/talk/20150716 Interview--Larry Wall.md deleted file mode 100644 index f3fea9c596..0000000000 --- a/sources/talk/20150716 Interview--Larry Wall.md +++ /dev/null @@ -1,127 +0,0 @@ -translating... - -Interview: Larry Wall -================================================================================ -> Perl 6 has been 15 years in the making, and is now due to be released at the end of this year. We speak to its creator to find out what’s going on. - -Larry Wall is a fascinating man. He’s the creator of Perl, a programming language that’s widely regarded as the glue holding the internet together, and mocked by some as being a “write-only” language due to its density and liberal use of non-alphanumeric characters. Larry also has a background in linguistics, and is well known for delivering entertaining “State of the Onion” presentations about the future of Perl. - -At FOSDEM 2015 in Brussels, we caught up with Larry to ask him why Perl 6 has taken so long (Perl 5 was released in 1994), how difficult it is to manage a project when everyone has strong opinions and pulling in different directions, and how his background in linguistics influenced the design of Perl from the start. Get ready for some intriguing diversions… - - - -**Linux Voice: You once had a plan to go and find an undocumented language somewhere in the world and create a written script for it, but you never had the opportunity to fulfil this plan. Is that something you’d like to go back and do now?** - -Larry Wall: You have to be kind of young to be able to carry that off! It’s actually a lot of hard work, and organisations that do these things don’t tend to take people in when they’re over a certain age. Partly this is down to health and vigour, but also because people are much better at picking up new languages when they’re younger, and you have to learn the language before making a script for it. - -I started trying to teach myself Japanese about 10 years ago, and I could speak it quite well, because of my phonology and phonetics training – but it’s very hard for me to understand what anybody says. So I can go to Japan and ask for directions, but I can’t really understand the answers! - -> “With Perl 6, we found some ways to make the computer more sure about what the user is talking about.” - -So usually learning a language well enough to develop a writing system, and to at least be conversational in the language, takes some period of years before you can get to the point where you can actually do literacy and start educating people on their own culture, as it were. And then you teach them to write about their own culture as well. - -Of course, if you have language helpers – and we were told not to call them “language informants”, or everyone would think we were working for the CIA! – if you have these people, you can get them to come in and help you learn the foreign language. They are not teachers but there are ways of eliciting things from someone who’s not a language teacher – they can still teach you how to speak. They can take a stick and point to it and say “that’s a stick”, and drop it and say “the stick falls”. Then you start writing things down and systematising things. - -The motivation that most people have, going out to these groups, is to translate the Bible into their languages. But that’s only one part of it; the other is also culture preservation. Missionaries get kind of a bad rep on that, because anthropologists think they should be left to sit their in their own culture. But somebody is probably going to change their culture anyway – it’s usually the army, or businesses coming in, like Coca Cola or the sewing machine people, or missionaries. And of those three, the missionaries are the least damaging, if they’re doing their job right. - -**LV: Many writing systems are based on existing scripts, and then you have invented ones like Greenlandic…** - -LW: The Cherokee invented their own just by copying letters, and they have no mapping much to what we think of letters, and it’s fairly arbitrary in that sense. It just has to represent how the people themselves think of the language, and sufficiently well to communicate. Often there will be variations on Western orthography, using characters from Latin where possible. Tonal languages have to mark the tones somehow, by accents or by numbers. - -As soon as you start leaning towards a phoenetic or phonological representation, then you also start to lose dialectical differences – or you have to write the dialectal differences. Or you have conventional spelling like we have in English, but pronunciation that doesn’t really match it. - -**LV: When you started working on Perl, what did you take from your background in linguistics that made you think: “this is really important in a programming language”?** - -LW: I thought a lot about how people use languages. In real languages, you have a system of nouns and verbs and adjectives, and you kind of know which words are which type. And in real natural languages, you have a lot of instances of shoving one word into a different slot. The linguistic theory I studied was called tagmemics, and it accounts for how this works in a natural language – that you could have something that you think of as a noun, but you can verb it, and people do that all time. - -You can pretty much shove anything in any slot, and you can communicate. One of my favourite examples is shoving an entire sentence in as an adjective. The sentence goes like this: “I don’t like your I-can-use-anything-as-an-adjective attitude”! - -So natural language is very flexible this way because you have a very intelligent listener – or at least, compared with a computer – who you can rely on to figure out what you must have meant, in case of ambiguity. Of course, in a computer language you have to manage the ambiguity much more closely. - -Arguably in Perl 1 through to 5 we didn’t manage it quite adequately enough. Sometimes the computer was confused when it really shouldn’t be. With Perl 6, we discovered some ways to make the computer more sure about what the user is talking about, even if the user is confused about whether something is really a string or a number. The computer knows the exact type of it. We figured out ways of having stronger typing internally but still have the allomorphic “you can use this as that” idea. - - - -**LV: For a long time Perl was seen as the “glue” language of the internet, for fitting bits and pieces together. Do you see Perl 6 as a release to satisfy the needs of existing users, or as a way to bring in new people, and bring about a resurgence in the language?** - -LW: The initial intent was to make a better Perl for Perl programmers. But as we looked at the some of the inadequacies of Perl 5, it became apparent that if we fixed these inadequacies, Perl 6 would be more applicable, as I mentioned in my talk – like how J. R. R. Tolkien talked about applicability [see http://tinyurl.com/nhpr8g2]. - -The idea that “easy things should be easy and hard things should be possible” goes way back, to the boundary between Perl 2 and Perl 3. In Perl 2, we couldn’t handle binary data or embedded nulls – it was just C-style strings. I said then that “Perl is just a text processing language – you don’t need those things in a text processing language”. - -But it occurred to me at the time that there were a large number of problems that were mostly text, and had a little bit of binary data in them – network addresses and things like that. You use binary data to open the socket but then text to process it. So the applicability of the language more than doubled by making it possible to handle binary data. - -That began a trade-off about what things should be easy in a language. Nowadays we have a principle in Perl, and we stole the phrase Huffman coding for it, from the bit encoding system where you have different sizes for characters. Common characters are encoded in a fewer number of bits, and rarer characters are encoded in more bits. - -> “There had to be a very careful balancing act. There were just so many good ideas at the beginning.” - -We stole that idea as a general principle for Perl, for things that are commonly used, or when you have to type them very often – the common things need to be shorter or more succinct. Another bit of that, however, is that they’re allowed to be more irregular. In natural language, it’s actually the most commonly used verbs that tend to be the most irregular. - -And there’s a reason for that, because you need more differentiation of them. One of my favourite books is called The Search for the Perfect Language by Umberto Eco, and it’s not about computer languages; it’s about philosophical languages, and the whole idea that maybe some ancient language was the perfect language and we should get back to it. - -All of those languages make the mistake of thinking that similar things should always be encoded similarly. But that’s not how you communicate. If you have a bunch of barnyard animals, and they all have related names, and you say “Go out and kill the Blerfoo”, but you really wanted them to kill the Blerfee, you might get a cow killed when you want a chicken killed. - -So in realms like that it’s actually better to differentiate the words, for more redundancy in the communication channel. The common words need to have more of that differentiation. It’s all about communicating efficiently, and then there’s also this idea of self-clocking codes. If you look at a UPC label on a product – a barcode – that’s actually a self-clocking code where each pair of bars and spaces is always in a unit of seven columns wide. You rely on that – you know the width of the bars will always add up to that. So it’s self-clocking. - -There are other self-clocking codes used in electronics. In the old transmission serial protocols there were stop and start bits so you could keep things synced up. Natural languages also do this. For instance, in the writing of Japanese, they don’t use spaces. Because the way they write it, they will have a Kanji character from Chinese at the head of each phrase, and then the endings are written in the a syllabary. - -**LV: Hiragana, right?** - -LW: Yes, Hiragana. So naturally the head of each phrase really stands out with this system. Similarly, in ancient Greek, most of the verbs were declined or conjugated. So they had standard endings were sort-of a clocking mechanism. Spaces were optional in their writing system as well – it was a more modern invention to put the spaces in. - -So similarly in computer languages, there’s value in having a self-clocking code. We rely on this heavily in Perl, and even more heavily in Perl 6 than in previous releases. The idea that when you’re parsing an expression, you’re either expecting a term or an infix operator. When you’re expecting a term you might also get a prefix operator – that’s kind-of in the same expectation slot – and when you’re expecting an infix you might also get a postfix for the previous term. - -But it flips back and forth. And if the compiler actually knows which it is expecting, you can overload those a little bit, and Perl does this. So a slash when it’s expecting a term will introduce a regular expression, whereas a slash when you’re expecting an infix will be division. On the other hand, we don’t want to overload everything, because then you lose the self-clocking redundancy. - -Most of our best error messages, for syntax errors, actually come out of noticing that you have two terms in a row. And then we try to figure out why there are two terms in a row – “oh, you must have left a semicolon out on the previous line”. So we can produce much better error messages than the more ad-hoc parsers. - - - -**LV: Why has Perl 6 taken fifteen years? It must be hard overseeing a language when everyone has different opinions about things, and there’s not always the right way to do things, and the wrong way.** - -LW: There had to be a very careful balancing act. There were just so many good ideas at the beginning – well, I don’t want to say they were all good ideas. There were so many pain points, like there were 361 RFCs [feature proposal documents] when I expected maybe 20. We had to sit back and actually look at them all, and ignore the proposed solutions, because they were all over the map and all had tunnel vision. Each one many have just changed one thing, but if we had done them all, it would’ve been a complete mess. - -So we had to re-rationalise based on how people were actually hurting when they tried to use Perl 5. We started to look at the unifying, underlying ideas. Many of these RFCs were based on the fact that we had an inadequate type system. By introducing a more coherent type system we could fix many problems in a sane fashion and a cohesive fashion. - -And we started noticing other ways how we could unify the featuresets and start reusing ideas in different areas. Not necessarily that they were the same thing underneath. We have a standard way of writing pairs – well, two ways in Perl! But the way of writing pairs with a colon could also be reused for radix notation, or for literal numbers in any base. It could also be used for various alternative forms of quoting. We say in Perl that it’s “strangely consistent”. - -> “People who made early implementations of Perl 6 came back to me, cap in hand, and said “We really need a language designer.”” - -Similar ideas pop up, and you say “I’m already familiar with how that syntax works, but I see it’s being used for something else”. So it took some unity of vision to find these unifications. People who had the various ideas and made early implementations of Perl 6 came back to me, cap-in-hand, and said “We really need a language designer. Could you be our benevolent dictator?” - -So I was the language designer, but I was almost explicitly told: “Stay out of the implementation! We saw what you did made out of Perl 5, and we don’t like it!” It was really funny because the innards of the new implementation started looking a whole lot like Perl 5 inside, and maybe that’s why some of the early implementations didn’t work well. - -Because we were still feeling our way into the whole design, the implementations made a lot of assumptions about what VM should do and shouldn’t do, so we ended up with something like an object oriented assembly language. That sort of problem was fairly pervasive at the beginning. Then the Pugs guys came along and said “Let’s use Haskell, because it makes you think very clearly about what you’re doing. Let’s use it to clarify our semantic model underneath.” - -So we nailed down some of those semantic models, but more importantly, we started building the test suite at that point, to be consistent with those semantic models. Then after that, the Parrot VM continued developing, and then another implementation, Niecza, came along and it was based on .NET. It was by a young fellow who was very smart and implemented a large subset of Perl 6, but he was kind of a loner, didn’t really figure out a way to get other people involved in his project. - -At the same time the Parrot project was getting too big for anyone to really manage it inside, and very difficult to refactor. At that point the fellows working on Rakudo decided that we probably needed to be on more platforms than just the Parrot VM. So they invented a portability layer called NQP which stands for “Not Quite Perl”. They ported it to first of all run on the JVM (Java Virtual Machine), and while they were doing that they were also secretly working on a new VM called MoarVM. That became public a little over a year ago. - -Both MoarVM and JVM run a pretty much equivalent set of regression tests – Parrot is kind-of trailing back in some areas. So that has been very good to flush out VM-specific assumptions, and we’re starting to think about NQP targeting other things. There was a Google Summer of Code project year to target NQP to JavaScript, and that might fit right in, because MoarVM also uses Node.js for much of its more mundane processing. - -We probably need to concentrate on MoarVM for the rest of this year, until we actually define 6.0, and then the rest will catch up. - -**LV: Last year in the UK, the government kicked off the Year of Code, an attempt to get young people interested in programming. There are lots of opinions about how this should be done – like whether you should teach low-level languages at the start, so that people really understand memory usage, or a high-level language. What’s your take on that?** - -LW: Up until now, the Python community has done a much better job of getting into the lower levels of education than we have. We’d like to do something in that space too, and that’s partly why we have the butterfly logo, because it’s going to be appealing to seven year old girls! - -But we do think that Perl 6 will be learnable as a first language. A number of people have surprised us by learning Perl 5 as their first language. And you know, there are a number of fairly powerful concepts even in Perl 5, like closures, lexical scoping, and features you generally get from functional programming. Even more so in Perl 6. - -> “Until now, the Python community has done a much better job of getting into the lower levels of education.” - -Part of the reason the Perl 6 has taken so long is that we have around 50 different principles we try to stick to, and in language design you’re end up juggling everything and saying “what’s really the most important principle here”? There has been a lot of discussion about a lot of different things. Sometimes we commit to a decision, work with it for a while, and then realise it wasn’t quite the right decision. - -We didn’t design or specify pretty much anything about concurrent programming until someone came along who was smart enough about it and knew what the different trade-offs were, and that’s Jonathan Worthington. He has blended together ideas from other languages like Go and C#, with concurrent primitives that compose well. Composability is important in the rest of the language. - -There are an awful lot of concurrent and parallel programming systems that don’t compose well – like threads and locks, and there have been lots of ways to do it poorly. So in one sense, it’s been worth waiting this extra time to see some of these languages like Go and C# develop really good high-level primitives – that’s sort of a contradiction in terms – that compose well. - --------------------------------------------------------------------------------- - -via: http://www.linuxvoice.com/interview-larry-wall/ - -作者:[Mike Saunders][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxvoice.com/author/mike/ diff --git a/sources/talk/20151019 Gaming On Linux--All You Need To Know.md b/sources/talk/20151019 Gaming On Linux--All You Need To Know.md new file mode 100644 index 0000000000..9b0df50160 --- /dev/null +++ b/sources/talk/20151019 Gaming On Linux--All You Need To Know.md @@ -0,0 +1,203 @@ +Gaming On Linux: All You Need To Know +================================================================================ + + +**Can I play games on Linux?** + +This is one of the most frequently asked questions by people who are thinking about [switching to Linux][1]. After all, gaming on Linux often termed as a distant possibility. In fact, some people even wonder if they can listen to music or watch movies on Linux. Considering that, question about native Linux games seem genuine. + +In this article, I am going to answer most of the Linux gaming questions a Linux beginner may have. For example, if it is possible to play games on Linux, if yes, what are the Linux games available, where can you **download Linux games** from or how do you get more information of gaming on Linux. + +But before I do that, let me make a confession. I am not a PC gamer or rather I should say, I am not desktop Linux gamer. I prefer to play games on my PS4 and I don’t care about PC games or even mobile games (no candy crush request sent to anyone in my friend list). This is the reason you see only a few articles in [Linux games][2] section of It’s FOSS. + +So why am I covering this topic then? + +Because I have been asked questions about playing games on Linux several times and I wanted to come up with a Linux gaming guide that could answer all those question. And remember, it’s not just gaming on Ubuntu I am talking about here. I am talking about Linux in general. + +### Can you play games on Linux? ### + +Yes and no! + +Yes, you can play games on Linux and no, you cannot play ‘all the games’ in Linux. + +Confused? Don’t be. What I meant here is that you can get plenty of popular games on Linux such as [Counter Strike, Metro Last Night][3] etc. But you might not get all the latest and popular Windows games on Linux, for e.g., [PES 2015][4]. + +The reason, in my opinion, is that Linux has less than 2% of desktop market share and these numbers are demotivating enough for most game developers to avoid working on the Linux version of their games. + +Which means that there is huge possibility that the most talked about games of the year may not be playable in Linux. Don’t despair, there are ‘other means’ to get these games on Linux and we shall see it in coming sections, but before that let’s talk about what kind of games are available for Linux. + +If I have to categorize, I’ll divide them in four categories: + +1. Native Linux Games +1. Windows games in Linux +1. Browser Games +1. Terminal Games + +Let’s start with the most important one, native Linux games, first. + +---------- + +### 1. Where to find native Linux games? ### + +Native Linux games mean those games which are officially supported in Linux. These games have native Linux client and can be installed like most other applications in Linux without requiring any additional effort (we’ll see about these in next section). + +So, as you see, there are games developed for Linux. Next question that arises is where can you find these Linux games and how can you play them. I am going to list some of the resources where you can get Linux games. + +#### Steam #### + + + +“[Steam][5] is a digital distribution platform for video games. As Amazon Kindle is digital distribution platform for e-Books, iTunes for music, similarly Steam is for games. It provides you the option to buy and install games, play multiplayer and stay in touch with other games via social networking on its platform. The games are protected with [DRM][6].” + +A couple of years ago, when gaming platform Steam announced support for Linux, it was a big news. It was an indication that gaming on Linux is being taken seriously. Though Steam’s decision was more influenced with its own Linux-based gaming console and a separate [Linux distribution called Steam OS][7], it still was a reassuring move that has brought a number of games on Linux. + +I have written a detailed article about installing and using Steam. If you are getting started with Steam, do read it. + +- [Install and use Steam for gaming on Linux][8] + +#### GOG.com #### + +[GOG.com][9] is another platform similar to Steam. Like Steam, you can browse and find hundreds of native Linux games on GOG.com, purchase the games and install them. If the games support several platforms, you can download and use them across various operating systems. Your purchased games are available for you all the time in your account. You can download them anytime you wish. + +One main difference between the two is that GOG.com offers only DRM free games and movies. Also, GOG.com is entirely web based. So you don’t need to install a client like Steam. You can simply download the games from browser and install them in your system. + +#### Portable Linux Games #### + +[Portable Linux Games][10] is a website that has a collection of a number of Linux games. The unique and best thing about Portable Linux Games is that you can download and store the games for offline installation. + +The downloaded files have all the dependencies (at times Wine and Perl installation) and these are also platform independent. All you need to do is to download the files and double click to install them. Store the downloadable file on external hard disk and use them in future. Highly recommend if you don’t have continuous access to high speed internet. + +#### Game Drift Game Store #### + +[Game Drift][11] is actually a Linux distribution based on Ubuntu with sole focus on gaming. While you might not want to start using this Linux distribution for the sole purpose of gaming, you can always visit its game store online and see what games are available for Linux and install them. + +#### Linux Game Database #### + +As the name suggests, [Linux Game Database][12] is a website with a huge collection of Linux games. You can browse through various category of games and download/install them from the game developer’s website. As a member of Linux Game Database, you can even rate the games. LGDB, kind of, aims to be the IGN or IMDB for Linux games. + +#### Penguspy #### + +Created by a gamer who refused to use Windows for playing games, [Penguspy][13] showcases a collection of some of the best Linux games. You can browse games based on category and if you like the game, you’ll have to go to the respective game developer’s website. + +#### Software Repositories #### + +Look into the software repositories of your own Linux distribution. There always will be some games in it. If you are using Ubuntu, Ubuntu Software Center itself has an entire section for games. Same is true for other Linux distributions such as Linux Mint etc. + +---------- + +### 2. How to play Windows games in Linux? ### + + + +So far we talked about native Linux games. But there are not many Linux games, or to be more precise, most popular Linux games are not available for Linux but they are available for Windows PC. So the questions arises, how to play Windows games in Linux? + +Good thing is that with the help of tools like Wine, PlayOnLinux and CrossOver, you can play a number of popular Windows games in Linux. + +#### Wine #### + +Wine is a compatibility layer which is capable of running Windows applications in systems like Linux, BSD and OS X. With the help of Wine, you can install and use a number of Windows applications in Linux. + +[Installing Wine in Ubuntu][14] or any other Linux is easy as it is available in most Linux distributions’ repository. There is a huge [database of applications and games supported by Wine][15] that you can browse. + +#### CrossOver #### + +[CrossOver][16] is an improved version of Wine that brings professional and technical support to Wine. But unlike Wine, CrossOver is not free. You’ll have to purchase the yearly license for it. Good thing about CrossOver is that every purchase contributes to Wine developers and that in fact boosts the development of Wine to support more Windows games and applications. If you can afford $48 a year, you should buy CrossOver for the support they provide. + +### PlayOnLinux ### + +PlayOnLinux too is based on Wine but implemented differently. It has different interface and slightly easier to use than Wine. Like Wine, PlayOnLinux too is free to use. You can browse the [applications and games supported by PlayOnLinux on its database][17]. + +---------- + +### 3. Browser Games ### + + + +Needless to say that there are tons of browser based games that are available to play in any operating system, be it Windows or Linux or Mac OS X. Most of the addictive mobile games, such as [GoodGame Empire][18], also have their web browser counterparts. + +Apart from that, thanks to [Google Chrome Web Store][19], you can play some more games in Linux. These Chrome games are installed like a standalone app and they can be accessed from the application menu of your Linux OS. Some of these Chrome games are playable offline as well. + +---------- + +### 4. Terminal Games ### + + + +Added advantage of using Linux is that you can use the command line terminal to play games. I know that it’s not the best way to play games but at times, it’s fun to play games like [Snake][20] or [2048][21] in terminal. There is a good collection of Linux terminal games at [this blog][22]. You can browse through it and play the ones you want. + +---------- + +### How to stay updated about Linux games? ### + +When you have learned a lot about what kind of games are available on Linux and how could you use them, next question is how to stay updated about new games on Linux? And for that, I advise you to follow these blogs that provide you with the latest happenings of the Linux gaming world: + +- [Gaming on Linux][23]: I won’t be wrong if I call it the nest Linux gaming news portal. You get all the latest rumblings and news about Linux games. Frequently updated, Gaming on Linux has dedicated fan following which makes it a nice community of Linux game lovers. +- [Free Gamer][24]: A blog focusing on free and open source games. +- [Linux Game News][25]: A Tumbler blog that updates on various Linux games. + +#### What else? #### + +I think that’s pretty much what you need to know to get started with gaming on Linux. If you are still not convinced, I would advise you to [dual boot Linux with Windows][26]. Use Linux as your main desktop and if you want to play games, boot into Windows. This could be a compromised solution. + +I think that’s pretty much what you need to know to get started with gaming on Linux. If you are still not convinced, I would advise you to [dual boot Linux with Windows][27]. Use Linux as your main desktop and if you want to play games, boot into Windows. This could be a compromised solution. + +It’s time for you to add your inputs. Do you play games on your Linux desktop? What are your favorites? What blogs you follow to stay updated on latest Linux games? + + +投票项目: +How do you play games on Linux? + +- I use Wine and PlayOnLinux along with native Linux Games +- I am happy with Browser Games +- I prefer the Terminal Games +- I use native Linux games only +- I play it on Steam +- I dual boot and go in to Windows to play games +- I don't play games at all + +注:投票代码 +
+ + + + +注,发布时根据情况看怎么处理 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/linux-gaming-guide/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/reasons-switch-linux-windows-xp/ +[2]:http://itsfoss.com/category/games/ +[3]:http://blog.counter-strike.net/ +[4]:https://pes.konami.com/tag/pes-2015/ +[5]:http://store.steampowered.com/ +[6]:https://en.wikipedia.org/wiki/Digital_rights_management +[7]:http://itsfoss.com/valve-annouces-linux-based-gaming-operating-system-steamos/ +[8]:http://itsfoss.com/install-steam-ubuntu-linux/ +[9]:http://www.gog.com/ +[10]:http://www.portablelinuxgames.org/ +[11]:http://gamedrift.org/GameStore.html +[12]:http://www.lgdb.org/ +[13]:http://www.penguspy.com/ +[14]:http://itsfoss.com/wine-1-5-11-released-ppa-available-to-download/ +[15]:https://appdb.winehq.org/ +[16]:https://www.codeweavers.com/products/ +[17]:https://www.playonlinux.com/en/supported_apps.html +[18]:http://empire.goodgamestudios.com/ +[19]:https://chrome.google.com/webstore/category/apps +[20]:http://itsfoss.com/nsnake-play-classic-snake-game-linux-terminal/ +[21]:http://itsfoss.com/play-2048-linux-terminal/ +[22]:https://ttygames.wordpress.com/ +[23]:https://www.gamingonlinux.com/ +[24]:http://freegamer.blogspot.fr/ +[25]:http://linuxgamenews.com/ +[26]:http://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ +[27]:http://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ \ No newline at end of file diff --git a/sources/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md b/sources/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md new file mode 100644 index 0000000000..7ce79073c5 --- /dev/null +++ b/sources/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md @@ -0,0 +1,38 @@ +Nautilus File Search Is About To Get A Big Power Up +================================================================================ + + +**Finding stray files and folders in Nautilus is about to get a whole lot easier. ** + +A new **search filter** for the default [GNOME file manager][1] is in development. It makes heavy use of GNOME’s spiffy pop-over menus in an effort to offer a simpler way to narrow in on search results and find exactly what you’re after. + +Developer Georges Stavracas is working on the new UI and [describes][2] the new editor as “cleaner, saner and more intuitive”. + +Based on a video he’s [uploaded to YouTube][3] demoing the new approach – which he hasn’t made available for embedding – he’s not wrong. + +> “Nautilus has very complex but powerful internals, which allows us to do many things. And indeed, there is code for the many options in there. So, why did it used to look so poorly implemented/broken?”, he writes on his blog. + +The question is part rhetorical; the new search filter interface surfaces many of these ‘powerful internals’ to yhe user. Searches can be filtered ad **hoc** based on content type, name or by date range. + +Changing anything in an app like Nautilus is likely to upset some users, so as helpful and straightforward as the new UI seems it could come in for some heat. + +Not that worry of discontent seems to hamper progress (though the outcry at the [removal of ‘type ahead’ search][4] in 2014 still rings loud in many ears, no doubt). GNOME 3.18, [released last month][5], introduced a new file progress dialog to Nautilus and better integration for remote shares, including Google Drive. + +Stavracas’ search filter are not yet merged in to Files’ trunk, but the reworked search UI is tentatively targeted for inclusion in GNOME 3.20, due spring next year. + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/10/new-nautilus-search-filter-ui + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://wiki.gnome.org/Apps/Nautilus +[2]:http://feaneron.com/2015/10/12/the-new-search-for-gnome-files-aka-nautilus/ +[3]:https://www.youtube.com/watch?v=X2sPRXDzmUw +[4]:http://www.omgubuntu.co.uk/2014/01/ubuntu-14-04-nautilus-type-ahead-patch +[5]:http://www.omgubuntu.co.uk/2015/09/gnome-3-18-release-new-features \ No newline at end of file diff --git a/sources/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md b/sources/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md deleted file mode 100644 index 1c61864ce8..0000000000 --- a/sources/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md +++ /dev/null @@ -1,251 +0,0 @@ -ictlyh Translating -How to Setup Red Hat Ceph Storage on CentOS 7.0 -================================================================================ -Ceph is an open source software platform that stores data on a single distributed computer cluster. When you are planning to build a cloud, then on top of the requirements you have to decide on how to implement your storage. Open Source CEPH is one of RED HAT mature technology based on object-store system, called RADOS, with a set of gateway APIs that present the data in block, file, and object modes. As a result of its open source nature, this portable storage platform may be installed and used in public or private clouds. The topology of a Ceph cluster is designed around replication and information distribution, which are intrinsic and provide data integrity. It is designed to be fault-tolerant, and can run on commodity hardware, but can also be run on a number of more advanced systems with the right setup. - -Ceph can be installed on any Linux distribution but it requires the recent kernel and other up-to-date libraries in order to be properly executed. But, here in this tutorial we will be using CentOS-7.0 with minimal installation packages on it. - -### System Resources ### - - **CEPH-STORAGE** - OS: CentOS Linux 7 (Core) - RAM:1 GB - CPU:1 CPU - DISK: 20 - Network: 45.79.136.163 - FQDN: ceph-storage.linoxide.com - - **CEPH-NODE** - OS: CentOS Linux 7 (Core) - RAM:1 GB - CPU:1 CPU - DISK: 20 - Network: 45.79.171.138 - FQDN: ceph-node.linoxide.com - -### Pre-Installation Setup ### - -There are few steps that we need to perform on each of our node before the CEPH storage setup. So first thing is to make sure that each node is configured with its networking setup with FQDN that is reachable to other nodes. - -**Configure Hosts** - -To setup the hosts entry on each node let's open the default hosts configuration file as shown below. - - # vi /etc/hosts - ----------- - - 45.79.136.163 ceph-storage ceph-storage.linoxide.com - 45.79.171.138 ceph-node ceph-node.linoxide.com - -**Install VMware Tools** - -While working on the VMware virtual environment, its recommended that you have installed its open VM tools. You can install using below command. - - #yum install -y open-vm-tools - -**Firewall Setup** - -If you are working on a restrictive environment where your local firewall in enabled then make sure that the number of following ports are allowed from in your CEPH storge admin node and client nodes. - -You must open ports 80, 2003, and 4505-4506 on your Admin Calamari node and port 80 to CEPH admin or Calamari node for inbound so that clients in your network can access the Calamari web user interface. - -You can start and enable firewall in centos 7 with given below command. - - #systemctl start firewalld - #systemctl enable firewalld - -To allow the mentioned ports in the Admin Calamari node run the following commands. - - #firewall-cmd --zone=public --add-port=80/tcp --permanent - #firewall-cmd --zone=public --add-port=2003/tcp --permanent - #firewall-cmd --zone=public --add-port=4505-4506/tcp --permanent - #firewall-cmd --reload - -On the CEPH Monitor nodes you have to allow the following ports in the firewall. - - #firewall-cmd --zone=public --add-port=6789/tcp --permanent - -Then allow the following list of default ports for talking to clients and monitors and for sending data to other OSDs. - - #firewall-cmd --zone=public --add-port=6800-7300/tcp --permanent - -It quite fair that you should disable firewall and SELinux settings if you are working in a non-production environment , so we are going to disable the firewall and SELinux in our test environment. - - #systemctl stop firewalld - #systemctl disable firewalld - -**System Update** - -Now update your system and then give it a reboot to implement the required changes. - - #yum update - #shutdown -r 0 - -### Setup CEPH User ### - -Now we will create a separate sudo user that will be used for installing the ceph-deploy utility on each node and allow that user to have password less access on each node because it needs to install software and configuration files without prompting for passwords on CEPH nodes. - -To create new user with its separate home directory run the below command on the ceph-storage host. - - [root@ceph-storage ~]# useradd -d /home/ceph -m ceph - [root@ceph-storage ~]# passwd ceph - -Each user created on the nodes must have sudo rights, you can assign the sudo rights to the user using running the following command as shown. - - [root@ceph-storage ~]# echo "ceph ALL = (root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/ceph - ceph ALL = (root) NOPASSWD:ALL - - [root@ceph-storage ~]# sudo chmod 0440 /etc/sudoers.d/ceph - -### Setup SSH-Key ### - -Now we will generate SSH keys on the admin ceph node and then copy that key to each Ceph cluster nodes. - -Let's run the following command on the ceph-node to copy its ssh key on the ceph-storage. - - [root@ceph-node ~]# ssh-keygen - Generating public/private rsa key pair. - Enter file in which to save the key (/root/.ssh/id_rsa): - Created directory '/root/.ssh'. - Enter passphrase (empty for no passphrase): - Enter same passphrase again: - Your identification has been saved in /root/.ssh/id_rsa. - Your public key has been saved in /root/.ssh/id_rsa.pub. - The key fingerprint is: - 5b:*:*:*:*:*:*:*:*:*:c9 root@ceph-node - The key's randomart image is: - +--[ RSA 2048]----+ - ----------- - - [root@ceph-node ~]# ssh-copy-id ceph@ceph-storage - - - -### Configure PID Count ### - -To configure the PID count value, we will make use of the following commands to check the default kernel value. By default its a small maximum number of threads that is '32768'. -So will configure this value to a higher number of threads by editing the system conf file as shown in the image. - - - -### Setup Your Administration Node Server ### - -With all the networking setup and verified, now we will install ceph-deploy using the user ceph. So, check the hosts entry by opening its file. - - #vim /etc/hosts - ceph-storage 45.79.136.163 - ceph-node 45.79.171.138 - -Now to add its repository run the below command. - - #rpm -Uhv http://ceph.com/rpm-giant/el7/noarch/ceph-release-1-0.el7.noarch.rpm - - - -OR create a new file and update the CEPH repository parameters but do not forget to mention your current release and distribution. - - [root@ceph-storage ~]# vi /etc/yum.repos.d/ceph.repo - ----------- - - [ceph-noarch] - name=Ceph noarch packages - baseurl=http://ceph.com/rpm-{ceph-release}/{distro}/noarch - enabled=1 - gpgcheck=1 - type=rpm-md - gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc - -After this update your system and install the ceph deploy package. - -### Installing CEPH-Deploy Package ### - -To upate the system with latest ceph repository and other packages, we will run the following command along with ceph-deploy installation command. - - #yum update -y && yum install ceph-deploy -y - -Image- - -### Setup the cluster ### - -Create a new directory and move into it on the admin ceph-node to collect all output files and logs by using the following commands. - - #mkdir ~/ceph-cluster - #cd ~/ceph-cluster - ----------- - - #ceph-deploy new storage - - - -Upon successful execution of above command you can see it creating its configuration files. -Now to configure the default configuration file of CEPH, open it using any editor and place the following two lines under its global parameters that reflects your public network. - - #vim ceph.conf - osd pool default size = 1 - public network = 45.79.0.0/16 - -### Installing CEPH ### - -We are now going to install CEPH on each of the node associated with our CEPH cluster. To do so we make use of the following command to install CEPH on our both nodes that is ceph-storage and ceph-node as shown below. - - #ceph-deploy install ceph-node ceph-storage - - - -This will takes some time while processing all its required repositories and installing the required packages. - -Once the ceph installation process is complete on both nodes we will proceed to create monitor and gather keys by running the following command on the same node. - - #ceph-deploy mon create-initial - - - -### Setup OSDs and OSD Daemons ### - -Now we will setup disk storages, to do so first run the below command to List all of your usable disks by using the below command. - - #ceph-deploy disk list ceph-storage - -In results will get the list of your disks used on your storage nodes that you will use for creating the OSD. Let's run the following command that consists of your disks names as shown below. - - #ceph-deploy disk zap storage:sda - #ceph-deploy disk zap storage:sdb - -Now to finalize the OSD setup let's run the below commands to setup the journaling disk along with data disk. - - #ceph-deploy osd prepare storage:sdb:/dev/sda - #ceph-deploy osd activate storage:/dev/sdb1:/dev/sda1 - -You will have to repeat the same command on all the nodes while it will clean everything present on the disk. Afterwards to have a functioning cluster, we need to copy the different keys and configuration files from the admin ceph-node to all the associated nodes by using the following command. - - #ceph-deploy admin ceph-node ceph-storage - -### Testing CEPH ### - -We have almost completed the CEPH cluster setup, let's run the below command to check the status of the running ceph by using the below command on the admin ceph-node. - - #ceph status - #ceph health - HEALTH_OK - -So, if you did not get any error message at ceph status , that means you have successfully setup your ceph storage cluster on CentOS 7. - -### Conclusion ### - -In this detailed article we learned about the CEPH storage clustering setup using the two virtual Machines with CentOS 7 OS installed on them that can be used as a backup or as your local storage that can be used to precess other virtual machines by creating its pools. We hope you have got this article helpful. Do share your experiences when you try this at your end. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/storage/setup-red-hat-ceph-storage-centos-7-0/ - -作者:[Kashif Siddique][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/kashifs/ \ No newline at end of file diff --git a/sources/tech/20151019 10 passwd command examples in Linux.md b/sources/tech/20151019 10 passwd command examples in Linux.md new file mode 100644 index 0000000000..c723992c89 --- /dev/null +++ b/sources/tech/20151019 10 passwd command examples in Linux.md @@ -0,0 +1,147 @@ +translation by strugglingyouth +10 passwd command examples in Linux +================================================================================ +As the name suggest **passwd** command is used to change the password of system users. If the passwd command is executed by non-root user then it will ask for the current password and then set the new password of a user who invoked the command. When this command is executed by super user or root then it can reset the password for any user including root without knowing the current password. + +In this post we will discuss passwd command with practical examples. + +#### Syntax : #### + + # passwd {options} {user_name} + +Different options that can be used in passwd command are listed below : + + + +### Example:1 Change Password of System Users ### + +When you logged in as non-root user like ‘linuxtechi’ in my case and run passwd command then it will reset password of logged in user. + + [linuxtechi@linuxworld ~]$ passwd + Changing password for user linuxtechi. + Changing password for linuxtechi. + (current) UNIX password: + New password: + Retype new password: + passwd: all authentication tokens updated successfully. + [linuxtechi@linuxworld ~]$ + +When you logged in as root user and run **passwd** command then it will reset the root password by default and if you specify the user-name after passwd command then it will change the password of that user. + + [root@linuxworld ~]# passwd + [root@linuxworld ~]# passwd linuxtechi + + + +**Note** : System user’s password is stored in an encrypted form in /etc/shadow file. + +### Example:2 Display Password Status Information. ### + +To display password status information of a user , use **-S** option in passwd command. + + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi PS 2015-09-20 0 99999 7 -1 (Password set, SHA512 crypt.) + [root@linuxworld ~]# + +In the above output first field shows the user name and second field shows Password status ( **PS = Password Set , LK = Password locked , NP = No Password** ), third field shows when the password was changed and last & fourth field shows minimum age, maximum age, warning period, and inactivity period for the password + +### Example:3 Display Password Status info for all the accounts ### + +To display password status info for all the accounts use “**-aS**” option in passwd command, example is shown below : + + root@localhost:~# passwd -Sa + + + +### Example:4 Removing Password of a User using -d option ### + +In my case i am removing/ deleting the password of ‘**linuxtechi**‘ user. + + [root@linuxworld ~]# passwd -d linuxtechi + Removing password for user linuxtechi. + passwd: Success + [root@linuxworld ~]# + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi NP 2015-09-20 0 99999 7 -1 (Empty password.) + [root@linuxworld ~]# + +“**-d**” option will make user’s password empty and will disable user’s account. + +### Example:5 Set Password Expiry Immediately ### + +Use ‘-e’ option in passwd command to expire user’s password immediately , this will force the user to change the password in the next login. + + [root@linuxworld ~]# passwd -e linuxtechi + Expiring password for user linuxtechi. + passwd: Success + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi PS 1970-01-01 0 99999 7 -1 (Password set, SHA512 crypt.) + [root@linuxworld ~]# + +Now Try to ssh machine using linuxtechi user. + + + +### Example:6 Lock the password of System User ### + +Use ‘**-l**‘ option in passwd command to lock a user’s password, it will add “!” at starting of user’s password. A User can’t Change it’s password when his/her password is locked. + + [root@linuxworld ~]# passwd -l linuxtechi + Locking password for user linuxtechi. + passwd: Success + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi LK 2015-09-20 0 99999 7 -1 (Password locked.) + [root@linuxworld ~]# + +### Example:7 Unlock User’s Password using -u option ### + + [root@linuxworld ~]# passwd -u linuxtechi + Unlocking password for user linuxtechi. + passwd: Success + [root@linuxworld ~]# + +### Example:8 Setting inactive days using -i option ### + +-i option in passwd command is used to set inactive days for a system user. This will come into the picture when password of user ( in my case linuxtechi) expired and user didn’t change its password in ‘**n**‘ number of days ( i.e 10 days in my case) then after that user will not able to login. + + [root@linuxworld ~]# passwd -i 10 linuxtechi + Adjusting aging data for user linuxtechi. + passwd: Success + [root@linuxworld ~]# + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi PS 2015-09-20 0 99999 7 10 (Password set, SHA512 crypt.) + [root@linuxworld ~]# + +### Example:9 Set Minimum Days to Change Password using -n option. ### + +In the below example linuxtechi user has to change the password in 90 days. A value of zero shows that user can change it’s password in any time. + + [root@linuxworld ~]# passwd -n 90 linuxtechi + Adjusting aging data for user linuxtechi. + passwd: Success + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi PS 2015-09-20 90 99999 7 10 (Password set, SHA512 crypt.) + [root@linuxworld ~]# + +### Example:10 Set Warning days before password expire using -w option ### + +‘**-w**’ option in passwd command is used to set warning days for a user. It means a user will be warned for n number of days that his/her password is going to expire. + + [root@linuxworld ~]# passwd -w 12 linuxtechi + Adjusting aging data for user linuxtechi. + passwd: Success + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi PS 2015-09-20 90 99999 12 10 (Password set, SHA512 crypt.) + [root@linuxworld ~]# + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/10-passwd-command-examples-in-linux/ + +作者:[Pradeep Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxtechi.com/author/pradeep/ diff --git a/sources/tech/20151019 11 df command examples in Linux.md b/sources/tech/20151019 11 df command examples in Linux.md new file mode 100644 index 0000000000..f259789eaa --- /dev/null +++ b/sources/tech/20151019 11 df command examples in Linux.md @@ -0,0 +1,258 @@ +11 df command examples in Linux +================================================================================ +df (disk free) command is used to display disk usage of the file system. By default df command shows the file system usage in 1K blocks for all the current mounted file system, if you want to display the output of df command in human readable format , use -h option like “df -h”. + +In this post we will discuss 11 different examples of ‘**df**‘ command in Linux + +Basic Format of df command in Linux + + # df {options} {mount_point_of_filesystem} + +Options used in df command : + + + +Sample Output of df : + + [root@linux-world ~]# df + Filesystem 1K-blocks Used Available Use% Mounted on + /dev/mapper/vg00-root 17003304 804668 15311852 5% / + devtmpfs 771876 0 771876 0% /dev + tmpfs 777928 0 777928 0% /dev/shm + tmpfs 777928 8532 769396 2% /run + tmpfs 777928 0 777928 0% /sys/fs/cgroup + /dev/mapper/vg00-home 14987616 41000 14162232 1% /home + /dev/sda1 487652 62593 395363 14% /boot + /dev/mapper/vg00-var 9948012 48692 9370936 1% /var + /dev/mapper/vg00-sap 14987656 37636 14165636 1% /sap + [root@linux-world ~]# + +### Example:1 List disk usage of all the file system using ‘-a’ ### + +when we use ‘-a’ option in df command , it will display disk usage of all the file systems. + + [root@linux-world ~]# df -a + Filesystem 1K-blocks Used Available Use% Mounted on + rootfs 17003304 804668 15311852 5% / + proc 0 0 0 - /proc + sysfs 0 0 0 - /sys + devtmpfs 771876 0 771876 0% /dev + securityfs 0 0 0 - /sys/kernel/security + tmpfs 777928 0 777928 0% /dev/shm + devpts 0 0 0 - /dev/pts + tmpfs 777928 8532 769396 2% /run + tmpfs 777928 0 777928 0% /sys/fs/cgroup + cgroup 0 0 0 - /sys/fs/cgroup/systemd + pstore 0 0 0 - /sys/fs/pstore + cgroup 0 0 0 - /sys/fs/cgroup/cpuset + cgroup 0 0 0 - /sys/fs/cgroup/cpu,cpuacct + cgroup 0 0 0 - /sys/fs/cgroup/memory + cgroup 0 0 0 - /sys/fs/cgroup/devices + cgroup 0 0 0 - /sys/fs/cgroup/freezer + cgroup 0 0 0 - /sys/fs/cgroup/net_cls + cgroup 0 0 0 - /sys/fs/cgroup/blkio + cgroup 0 0 0 - /sys/fs/cgroup/perf_event + cgroup 0 0 0 - /sys/fs/cgroup/hugetlb + configfs 0 0 0 - /sys/kernel/config + /dev/mapper/vg00-root 17003304 804668 15311852 5% / + selinuxfs 0 0 0 - /sys/fs/selinux + systemd-1 0 0 0 - /proc/sys/fs/binfmt_misc + debugfs 0 0 0 - /sys/kernel/debug + hugetlbfs 0 0 0 - /dev/hugepages + mqueue 0 0 0 - /dev/mqueue + /dev/mapper/vg00-home 14987616 41000 14162232 1% /home + /dev/sda1 487652 62593 395363 14% /boot + /dev/mapper/vg00-var 9948012 48692 9370936 1% /var + /dev/mapper/vg00-sap 14987656 37636 14165636 1% /sap + [root@linux-world ~]# + +### Example:2 Display the output of df command in human readable format. ### + +Using ‘-h’ option in df command , output can be displayed in human readable format ( e.g 5K , 500M & 5G ) + + [root@linux-world ~]# df -h + Filesystem Size Used Avail Use% Mounted on + /dev/mapper/vg00-root 17G 786M 15G 5% / + devtmpfs 754M 0 754M 0% /dev + tmpfs 760M 0 760M 0% /dev/shm + tmpfs 760M 8.4M 752M 2% /run + tmpfs 760M 0 760M 0% /sys/fs/cgroup + /dev/mapper/vg00-home 15G 41M 14G 1% /home + /dev/sda1 477M 62M 387M 14% /boot + /dev/mapper/vg00-var 9.5G 48M 9.0G 1% /var + /dev/mapper/vg00-sap 15G 37M 14G 1% /sap + [root@linux-world ~]# + +### Example:3 Display Space usage of particular file system ### + +Suppose we want to print space usage of /sap file system, + + [root@linux-world ~]# df -h /sap/ + Filesystem Size Used Avail Use% Mounted on + /dev/mapper/vg00-sap 15G 37M 14G 1% /sap + [root@linux-world ~]# + +### Example:4 Print file system type of all mounted file systems ### + +‘**-T**’ is used in df command to display the file system type in the output. + + [root@linux-world ~]# df -T + Filesystem Type 1K-blocks Used Available Use% Mounted on + /dev/mapper/vg00-root ext4 17003304 804668 15311852 5% / + devtmpfs devtmpfs 771876 0 771876 0% /dev + tmpfs tmpfs 777928 0 777928 0% /dev/shm + tmpfs tmpfs 777928 8532 769396 2% /run + tmpfs tmpfs 777928 0 777928 0% /sys/fs/cgroup + /dev/mapper/vg00-home ext4 14987616 41000 14162232 1% /home + /dev/sda1 ext3 487652 62593 395363 14% /boot + /dev/mapper/vg00-var ext3 9948012 48696 9370932 1% /var + /dev/mapper/vg00-sap ext3 14987656 37636 14165636 1% /sap + [root@linux-world ~]# + +### Example:5 Print disk usage of file systems in block-size. ### + + [root@linux-world ~]# df -k + Filesystem 1K-blocks Used Available Use% Mounted on + /dev/mapper/vg00-root 17003304 804668 15311852 5% / + devtmpfs 771876 0 771876 0% /dev + tmpfs 777928 0 777928 0% /dev/shm + tmpfs 777928 8532 769396 2% /run + tmpfs 777928 0 777928 0% /sys/fs/cgroup + /dev/mapper/vg00-home 14987616 41000 14162232 1% /home + /dev/sda1 487652 62593 395363 14% /boot + /dev/mapper/vg00-var 9948012 48696 9370932 1% /var + /dev/mapper/vg00-sap 14987656 37636 14165636 1% /sap + [root@linux-world ~]# + +### Example:6 Display inodes information of file system. ### + +‘**-i**’ option in df command is used to display inode information of the file system + +inodes info of all the file system : + + [root@linux-world ~]# df -i + Filesystem Inodes IUsed IFree IUse% Mounted on + /dev/mapper/vg00-root 1089536 22031 1067505 3% / + devtmpfs 192969 357 192612 1% /dev + tmpfs 194482 1 194481 1% /dev/shm + tmpfs 194482 420 194062 1% /run + tmpfs 194482 13 194469 1% /sys/fs/cgroup + /dev/mapper/vg00-home 960992 15 960977 1% /home + /dev/sda1 128016 337 127679 1% /boot + /dev/mapper/vg00-var 640848 1235 639613 1% /var + /dev/mapper/vg00-sap 960992 11 960981 1% /sap + [root@linux-world ~]# + +inodes info of particular file system : + + [root@linux-world ~]# df -i /sap/ + Filesystem Inodes IUsed IFree IUse% Mounted on + /dev/mapper/vg00-sap 960992 11 960981 1% /sap + [root@linux-world ~]# + +### Example:7 Print grant total space usage of all file system. ### + +‘–total‘ option in df command is used to display the grant total of disk usage of all the file system. + + [root@linux-world ~]# df -h --total + Filesystem Size Used Avail Use% Mounted on + /dev/mapper/vg00-root 17G 786M 15G 5% / + devtmpfs 754M 0 754M 0% /dev + tmpfs 760M 0 760M 0% /dev/shm + tmpfs 760M 8.4M 752M 2% /run + tmpfs 760M 0 760M 0% /sys/fs/cgroup + /dev/mapper/vg00-home 15G 41M 14G 1% /home + /dev/sda1 477M 62M 387M 14% /boot + /dev/mapper/vg00-var 9.5G 48M 9.0G 1% /var + /dev/mapper/vg00-sap 15G 37M 14G 1% /sap + total 58G 980M 54G 2% - + [root@linux-world ~]# + +### Example:8 Print only Local file system space usage info. ### + +Suppose network file system also mounted on linux box and but we want to display local file system information only, this can be achieved by using ‘-l‘ option in df command. + + + +Limiting to local file system : + + [root@linux-world ~]# df -Thl + Filesystem Type Size Used Avail Use% Mounted on + /dev/mapper/vg00-root ext4 17G 791M 15G 6% / + devtmpfs devtmpfs 754M 0 754M 0% /dev + tmpfs tmpfs 760M 0 760M 0% /dev/shm + tmpfs tmpfs 760M 8.4M 752M 2% /run + tmpfs tmpfs 760M 0 760M 0% /sys/fs/cgroup + /dev/mapper/vg00-home ext4 15G 41M 14G 1% /home + /dev/sda1 ext3 477M 62M 387M 14% /boot + /dev/mapper/vg00-var ext3 9.5G 105M 8.9G 2% /var + /dev/mapper/vg00-sap ext3 15G 37M 14G 1% /sap + [root@linux-world ~]# + +### Example:9 Print Disk Space information of particular file system type. ### + +‘**-t**’ option in df command is used to print information of particular file system type, after ‘-t’ specify the file system type, example is shown below : + +for ext4 : + + [root@linux-world ~]# df -t ext4 + Filesystem 1K-blocks Used Available Use% Mounted on + /dev/mapper/vg00-root 17003304 809492 15307028 6% / + /dev/mapper/vg00-home 14987616 41000 14162232 1% /home + [root@linux-world ~]# + +for nfs4 : + + [root@linux-world ~]# df -t nfs4 + Filesystem 1K-blocks Used Available Use% Mounted on + 192.168.1.5:/opensuse 301545472 266833920 19371008 94% /data + [root@linux-world ~]# + +### Example:10 Exclude Particular file system type using ‘-x’ option ### + +“**-x** or **–exclude-type**” is used to exclude the certain file system type in the output of df command. + +Let suppose we want to print all the file systems excluding ext3 file system. + + [root@linux-world ~]# df -x ext3 + Filesystem 1K-blocks Used Available Use% Mounted on + /dev/mapper/vg00-root 17003304 809492 15307028 6% / + devtmpfs 771876 0 771876 0% /dev + tmpfs 777928 0 777928 0% /dev/shm + tmpfs 777928 8540 769388 2% /run + tmpfs 777928 0 777928 0% /sys/fs/cgroup + /dev/mapper/vg00-home 14987616 41000 14162232 1% /home + 192.168.1.5:/opensuse 301545472 266834944 19369984 94% /data + [root@linux-world ~]# + +### Example:11 Print only certain fields in output of df command. ### + +‘**–output={field_name1,field_name2….}**‘ option is used to display the certain fields in df command output. + +Valid field names are: ‘source’, ‘fstype’, ‘itotal’, ‘iused’, ‘iavail’, ‘ipcent’, ‘size’, ‘used’, ‘avail’, ‘pcent’ and ‘target’ + + [root@linux-world ~]# df --output=fstype,size,iused + Type 1K-blocks IUsed + ext4 17003304 22275 + devtmpfs 771876 357 + tmpfs 777928 1 + tmpfs 777928 423 + tmpfs 777928 13 + ext4 14987616 15 + ext3 487652 337 + ext3 9948012 1373 + ext3 14987656 11 + nfs4 301545472 451099 + [root@linux-world ~]# + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/11-df-command-examples-in-linux/ + +作者:[Pradeep Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxtechi.com/author/pradeep/ \ No newline at end of file diff --git a/sources/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md b/sources/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md new file mode 100644 index 0000000000..217f9ebcda --- /dev/null +++ b/sources/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md @@ -0,0 +1,61 @@ +Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy +================================================================================ +> **Question:** My computer is connected to a corporate network sitting behind an HTTP proxy. When I try to install Ubuntu desktop on the computer from a CD-ROM drive, the installation hangs and never finishes while trying to retrieve files, which is presumably due to the proxy. However, the problem is that Ubuntu installer never asks me to configure proxy during installation procedure. Then how can I install Ubuntu desktop behind a proxy? + +Unlike Ubuntu server, installation of Ubuntu desktop is pretty much auto-pilot, not leaving much room for customization, such as custom disk partitioning, manual network settings, package selection, etc. While such simple, one-shot installation is considered user-friendly, it leaves much to be desired for those users looking for "advanced installation mode" to customize their Ubuntu desktop installation. + +In addition, one big problem of the default Ubuntu desktop installer is the absense of proxy settings. If your computer is connected behind a proxy, you will notice that Ubuntu installation gets stuck while preparing to download files. + + + +This post describes how to get around the limitation of Ubuntu installer and **install Ubuntu desktop when you are behind a proxy**. + +The basic idea is as follows. Instead of starting with Ubuntu installer directly, boot into live Ubuntu desktop first, configure proxy settings, and finally launch Ubuntu installer manually from live desktop. The following is the step by step procedure. + +After booting from Ubuntu desktop CD/DVD or USB, click on "Try Ubuntu" on the first welcome screen. + + + +Once you boot into live Ubuntu desktop, click on Settings icon in the left. + + + +Go to Network menu. + + + +Configure proxy settings manually. + + + +Next, open a terminal. + + + +Enter a root session by typing the following: + + $ sudo su + +Finally, type the following command as the root. + + # ubiquity gtk_ui + +This will launch GUI-based Ubuntu installer as follows. + + + +Proceed with the rest of installation. + + + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-ubuntu-desktop-behind-proxy.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file diff --git a/sources/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md b/sources/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md deleted file mode 100644 index 57f93d50b2..0000000000 --- a/sources/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md +++ /dev/null @@ -1,168 +0,0 @@ -translation by strugglingyouth -How to Recover Data and Rebuild Failed Software RAID’s – Part 8 -================================================================================ -In the previous articles of this [RAID series][1] you went from zero to RAID hero. We reviewed several software RAID configurations and explained the essentials of each one, along with the reasons why you would lean towards one or the other depending on your specific scenario. - - - -Recover Rebuild Failed Software RAID’s – Part 8 - -In this guide we will discuss how to rebuild a software RAID array without data loss when in the event of a disk failure. For brevity, we will only consider a RAID 1 setup – but the concepts and commands apply to all cases alike. - -#### RAID Testing Scenario #### - -Before proceeding further, please make sure you have set up a RAID 1 array following the instructions provided in Part 3 of this series: [How to set up RAID 1 (Mirror) in Linux][2]. - -The only variations in our present case will be: - -1) a different version of CentOS (v7) than the one used in that article (v6.5), and - -2) different disk sizes for /dev/sdb and /dev/sdc (8 GB each). - -In addition, if SELinux is enabled in enforcing mode, you will need to add the corresponding labels to the directory where you’ll mount the RAID device. Otherwise, you’ll run into this warning message while attempting to mount it: - - - -SELinux RAID Mount Error - -You can fix this by running: - - # restorecon -R /mnt/raid1 - -### Setting up RAID Monitoring ### - -There is a variety of reasons why a storage device can fail (SSDs have greatly reduced the chances of this happening, though), but regardless of the cause you can be sure that issues can occur anytime and you need to be prepared to replace the failed part and to ensure the availability and integrity of your data. - -A word of advice first. Even when you can inspect /proc/mdstat in order to check the status of your RAIDs, there’s a better and time-saving method that consists of running mdadm in monitor + scan mode, which will send alerts via email to a predefined recipient. - -To set this up, add the following line in /etc/mdadm.conf: - - MAILADDR user@