Merge pull request #22 from LCTT/master

Update Repository
This commit is contained in:
joeren 2014-07-23 14:08:47 +08:00
commit 21cd0beeac
17 changed files with 592 additions and 291 deletions

View File

@ -1,26 +1,28 @@
HTG解释什么是Unix以及它为什么这么重要
什么是Unix以及它为什么这么重要
================================================================================
![](http://cdn.howtogeek.com/wp-content/uploads/2014/02/ken-thompson-and-dennis-richie-at-pdp-11.jpg)
大多数操作系统可以被划分到两个不同的家族。除了微软的基于Windows NT的操作系统外几乎所有其他的都可以追溯到Unix。
LinuxMac OS XAndroidiOSChrome OSPlayStaion 4上运行的Orbis OS运行在路由器上的任意固件所有这些操作系统通常都被称为“类Unix”操作系统。
LinuxMac OS XAndroidiOSChrome OSPlayStaion 4上运行的Orbis OS运行在路由器上的各种固件所有这些操作系统通常都被称为“类Unix”操作系统。
### Unix的设计现在都还在应用 ###
Unix在20世纪60年代中晚期诞生于AT&T的贝尔实验室中。最初发布的Unix中的一些重要设计因素到如今都还在使用。
其中一个是“Unix哲学”建立小的模块化的应用只做一件事情并把它做好。如果你对Linux终端很熟悉的话应该对这个不陌生系统提供了大量的应用可以通过[管道或其他特性][1]形成不同的组合来完成更复杂的任务。甚至图形界面程序也经常会在后台调用更简单的应用去做比较耗时的任务。这种模式也让[建立终端脚本][2]更为简单,通过文本把一些简单工具结合起来去做复杂的事情。
其中一个设计是“Unix哲学”建立小的模块化的应用只做一件事情并把它做好。如果你对Linux终端很熟悉的话应该对这个不陌生系统提供了大量的应用可以通过[管道或其他特性][1]形成不同的组合来完成更复杂的任务。甚至图形界面程序也经常会在后台调用更简单的应用去做比较耗时的任务。这种模式也让[建立终端脚本][2]更为简单,通过文本把一些简单工具结合起来去做复杂的事情。
Unix还设计了一个单一的文件系统程序可以通过它互相通讯。这也是[为什么在Linux里说“一切都是文件”][3]-包括硬件设备和提供系统信息或其他数据的特殊文件。这也是为什么只有Windows系统中才有磁盘盘符这是从DOS继承过来的在其他操作系统中所有文件都是一个单一目录结构中的一部分。
Unix还设计了一个单一的文件系统程序可以通过它互相通讯。这也是[为什么在Linux里说“一切都是文件”][3]-包括硬件设备文件,和提供系统信息及其他数据的特殊文件。这也是为什么只有Windows系统中才有磁盘盘符这是从DOS继承过来的在其他操作系统中所有文件都是一个单一目录结构中的一部分。
![](http://cdn.howtogeek.com/wp-content/uploads/2014/02/unix-bell-labs.jpg)
### 那些从Unix派生出的系统 ###
类似任何往前追溯40年的历史Unix的历史和它的派生系统一片混乱。为了简单我们把Unix的派生系统大致分成两组。
类似任何可以往前追溯40年的历史Unix的历史和它的派生系统一片混乱。为了简单我们把Unix的派生系统大致分成两组。
一组Unix派生系统是学术界开发的。首先是BSD伯克利软件发布版一个开源的类Unix操作系统。BSD如今还存在于FreeBSDNetBSD和OpenBSD等系统中。NeXTStep基于最初版的BSD开发苹果的Mac OS X基于NeXTStepiOS基于Mac OS X。许多其他操作系统包括运行在PlayStation 4上的Orbis OS也源于各种BSD操作系统。
一组Unix派生系统是学术界开发的。
首先是BSD伯克利软件发布版一个开源的类Unix操作系统。BSD如今还存在于FreeBSDNetBSD和OpenBSD等系统中。NeXTStep基于最初版的BSD开发苹果的Mac OS X基于NeXTStepiOS基于Mac OS X。许多其他操作系统包括运行在PlayStation 4上的Orbis OS也源于各种BSD操作系统。
Richard Stallman建立GNU项目的目的是为了反对AT&T的Unix软件协议条款日渐严格的限制。MINIX是一个类Unix操作系统为教育目的而实现的而Linux则是受到了MINIX的启发。[我们今天所熟悉的Linux其实应该叫GNU/Linux][4]因为它是由Linux内核和大量GNU应用组成的。GNU/Linux不是直接从BSD继承下来的但是它继承了Unix的设计而且根植于学术界。如今许多操作系统包括AndroidChrome OSSteam OS以及数量巨大的在各种设备上使用的嵌入式操作系统都基于Linux。
@ -34,7 +36,7 @@ Richard Stallman建立GNU项目的目的是为了反对AT&T的Unix软件协议
许多人希望Unix能够成为工业标准操作系统但是DOS和“IBM PC兼容”计算机却最终人气爆发而普及开来。微软的DOS也成为众多DOS系统中最成功的一个。DOS完全没有参照Unix这也是[为什么Windows使用反斜杠划分文件路径而其他所有系统都使用正斜杠][6]。这个决定是在早期的DOS系统中做出的而之后的Windows版本继承了这一设定就像BSDLinuxMac OS X和其他类Unix操作系统继承了许多Unix设计因素一样。
Windows 3.1Windows 95Windows 98and Windows ME都是建立在DOS的基础上。当时微软已经在开发一个更现代更稳定的操作系统叫做Windows NT意思是“Windows新技术”。Windows NT最终通过Windows XP应用到普通计算机用户中但是之前它都只用于针对企业用户的Windows 2000和Windows NT。
Windows 3.1Windows 95Windows 98 Windows ME都是建立在DOS的基础上。当时微软已经在开发一个更现代更稳定的操作系统叫做Windows NT意思是“Windows新技术”。Windows NT最终通过Windows XP应用到普通计算机用户中但是之前它都只用于针对企业用户的Windows 2000和Windows NT。
如今所有微软的操作系统都基于Windows NT内核。Windows 7Windows 8Windows RTWindows Phone 8Windows Server以及Xbox One上的操作系统都在使用Windows NT内核。不像其他大多数操作系统那样Windows NT没有被开发成一个类Unix操作系统。
@ -42,11 +44,11 @@ Windows 3.1Windows 95Windows 98and Windows ME都是建立在DOS的基
![](http://cdn.howtogeek.com/wp-content/uploads/2014/02/windows-2000-professional-built-on-nt-technology.jpg)
为什么它影响很大
### 为什么它影响很大 ###
不知道你有没有看过Mac OS X终端或是文件系统有没有注意到它们和Linux是如此相似而又和Windows是如此不同好吧原因是Mac OS X和Linux两个都是类Unix操作系统。
了解了这点历史就可以帮助你理解什么是“类Unix”操作系统以及为什么这么多操作系统看起来都差不多而Windows却那么与众不同。这也可以解释为什么Linux极客对Mac OS X上的终端会感觉如此熟悉而[Windows 7上的Command Prompt和PowerShell][7]相对于其他命令行环境显得如此不同
了解了这点历史就可以帮助你理解什么是“类Unix”操作系统以及为什么这么多操作系统看起来都差不多而Windows却那么与众不同。这也可以解释为什么Linux极客对Mac OS X上的终端会感觉如此熟悉而[Windows 7上的Command Prompt和PowerShell][7]相对于其他命令行环境显得格格不入
这只是一点快速掠过的历史帮助了解是如何发展到今天的而不用陷入到细节中。如果你想了解更多可以找到许多关于Unix历史的整本的书籍。
@ -56,7 +58,7 @@ Windows 3.1Windows 95Windows 98and Windows ME都是建立在DOS的基
via: http://www.howtogeek.com/182649/htg-explains-what-is-unix/
译者:[zpl1025](https://github.com/zpl1025) 校对:[校对者ID](https://github.com/校对者ID)
译者:[zpl1025](https://github.com/zpl1025) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,5 +1,3 @@
CNprober翻译完成。。。619913541
Betty通过大白话执行Linux命令
================================================================================
@ -7,7 +5,7 @@ Betty通过大白话执行Linux命令
### 安装 ###
Betty的安装非常简单直接。首先确认你已经安装了下面这些依赖包[译注需要安装至少Ruby1.9以上版本]。
Betty的安装非常简单直接。首先确认你已经安装了下面这些依赖包[LCTT译注需要安装至少Ruby1.9以上版本]。
#### 对于基于Debian的系统####
@ -17,7 +15,7 @@ Betty的安装非常简单直接。首先确认你已经安装了下面这些依
yum install git curl ruby
现在git工具把Betty库clone到你自定义的任何路径。这里我克隆到我的home目录**例如 /home/sk/**.
现在git工具把Betty库clone到你自定义的任何路径。这里我克隆到我的home目录**例如 /home/sk/**.
git clone https://github.com/pickhardt/betty
@ -35,7 +33,7 @@ Betty的安装非常简单直接。首先确认你已经安装了下面这些依
### 用法 ###
你应该在英语短语之前加上单词“betty”。你也许已经知道如果我们想知道在系统中我们的用户名应该运行下面的命令
你应该在英语短语之前加上单词“betty” [LCTT译注你自然可以用你的小甜心的名字来替换这个不是知道是谁的Betty :>]。你也许已经知道,如果我们想知道在系统中我们的用户名,应该运行下面的命令:
whoami
@ -60,7 +58,7 @@ Betty的安装非常简单直接。首先确认你已经安装了下面这些依
betty whats my name
Betty不确定她应该查找系统用户名还是用户全名。这种情况下她会询问你多个问题来找到准确的结果。如你下面所见Betty问我想要运行哪一条命令whoami 还是 finger $(whoami) | sed 's/.*:*//;q')[译注需要你的系统已经安装finger]。我只想知道我的用户名,所以我选择数字**1**。
Betty不确定她应该查找系统用户名还是用户全名。这种情况下她会询问你多个问题来找到准确的结果。如你下面所见Betty问我想要运行哪一条命令whoami 还是 finger $(whoami) | sed 's/.*:*//;q')[LCTT译注需要你的系统已经安装finger]。我只想知道我的用户名,所以我选择数字**1**。
Betty: Okay, I have multiple ways to respond.
Betty: Enter the number of the command you want me to run, or N (no) if you don't want me to run any.
@ -76,7 +74,6 @@ Betty不确定她应该查找系统用户名还是用户全名。这种情况下
如果你想要压缩一个文件或者文件夹用下面的命令。例如我想压缩我home目录下的“test”文件夹。
betty compress test/ test.tar.gz
输出是这样的:
@ -197,7 +194,7 @@ Cheers!
via: http://www.unixmen.com/betty-translate-english-phrases-linux-commands/
译者:[love_daisy_love](https://github.com/CNprober) 校对:[校对者ID](https://github.com/校对者ID)
译者:[love\_daisy\_love](https://github.com/CNprober) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,5 +1,5 @@
#命令行星期二-第四部分#
--------------------------------------------------------
命令行星期二——第四部分
===================
大家好。新的一周,新的冒险!
@ -10,17 +10,19 @@
###通配符###
使用图形工具区复制、粘贴、新建目录等操作也许很容易,但是若想完成一些更复杂的任务,例如仅仅将一个目录下的所有.html文件复制到另一个目录中、或者只复制在某个目录中不存在的文件这时命令行也许会比较方便。我们回到通配符的学习中通配符是shell的基本功能它是一个由一些特殊字符组成的集合它让你可以用一些简单的规则来选择出某些文件。通配符可以出现在文件名中用于指定文件名的字符个数和字母的大/小写等规则)。
如下表(点击放大):
如下表
![](https://news.opensuse.org/wp-content/uploads/2014/07/Screenshot-08.-07.-2014-125946.png)
下面是mr Shotts给出的一些实例如下表点击放大
下面是肖茨先生给出的一些实例,如下表:
![](https://news.opensuse.org/wp-content/uploads/2014/07/Screenshot-08.-07.-2014-125959.png)
如果你使用一个包含文件名参数的命令,你就可以使用通配符。
###cp###
cp是一个用于复制文件或者目录的命令它的用法相当的简单。进入到你想复制的文件所在的目录然后使用如下命令
`cp file1 file2` -复制一个文件
@ -29,11 +31,12 @@ cp是一个用于复制文件或者目录的命令它的用法相当的简单
`cp file1 file2 ... directory` -从当前工作目录复制多个文件到指定的目录。
下表是mr Shotts给出的cp命令的一些选项
下表是肖茨先生给出的cp命令的一些选项
![](https://news.opensuse.org/wp-content/uploads/2014/07/Screenshot-08.-07.-2014-134248.png)
###mv###
mv是今天的第二个命令我们可以使用mv来重命名一个文件或目录或者移动一个文件或目录。我们可以这样使用mv命令。
`mv filename1 filename2` -若想将文件filename1重命名为filename2。
@ -47,6 +50,7 @@ mv是今天的第二个命令我们可以使用mv来重命名一个文件或
![](https://news.opensuse.org/wp-content/uploads/2014/07/Screenshot-08.-07.-2014-133515.png)
###rm###
rm命令是用于删除文件或目录它的用法比较直接如下
`rm file`
@ -62,6 +66,7 @@ rm命令是用于删除文件或目录它的用法比较直接如下
但是使用rm命令时要小心点。因为并没有撤销删除的选项因此使用rm命令式要格外的小心避免对你的系统造成不必要的破坏。
###mkdir###
mkdir是用于创建目录.它是今天最简单的一个命令:
`mkdir directory`
@ -73,6 +78,6 @@ mkdir是用于创建目录.它是今天最简单的一个命令:
-------------------------------------------------------------------------
via: https://news.opensuse.org/2014/07/08/command-line-tuesdays-part-four/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
译者:[cvsher](https://github.com/cvsher) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,42 @@
Budgie Desktop 5.1 Is a Superb New Desktop Environment for Conservative Users
================================================================================
![](http://i1-news.softpedia-static.com/images/news2/Budgie-Desktop-5-1-Is-a-Superb-New-Desktop-Environment-For-Conservative-Users-451477-2.jpg)
**The developer of Evolve OS, Ikey Doherty, has made a new desktop environment called Budgie Desktop and released a new version of it.**
Evolve OS hasn't been launched yet, but the developer is actively working on it. Instead of adopting an existing desktop environment, he decided that it would be better to make his own. It's based on GNOME and uses quite a few GNOME packages, but it looks very different. In fact, it follows the same paradigm as MATE and Cinnamon, although Budgie seems to be a little more modern and polished.
It's quite interesting to see that a critical piece of technology is released before the operating system that it's going to serve, but potential users don't have to be completely taken by surprise. To that effect, a [PPA][1] has been put in place for Ubuntu 14.04 LTS and Ubuntu 14.10, although it's not official. Also, the Arch Linux users will find the new desktop environment in the AUR repository.
“Almost all of the changes since v4 have been related to the panel. Its been completely rewritten in Vala, lowering the maintenance overhead and significantly reducing the barrier of entry for new contributors. So, when your update comes through later on (hopefully) today through OBS if you use it, or for Evolve OS users you already have the update, you should only see minor visual differences. The idea was not to change the look, but to rewrite what was there and make it moar better.”
“The rewrite into Vala took quite some effort, but has immediately paid off. In the future all of the desktop will be rewritten to use Vala, and being the second write we do things better the second time around,” says Ikey Doherty in the release [announcement][2].
Even if the desktop environment looks pretty advanced, judging by the version number, there is still room for improvements. The developer has promised that the next release in the series, 6.x, will allow users to write plugins in any language supported by libpeas, and that includes C, Vala, JavaScript, and Python.
Users will also notice that some of the main elements from Budgie Desktop have remained in place, like the position of the menu and the size of the icons. In the future, it will be possible to change them, but for now, users need to contend with what's available.
Even in this incipient phase, Budgie Desktop 5.1 looks better than many of the alternatives that can be found right now on other OSes.
Download the source package right now for Ubuntu and Arch Linux:
- [GIT sources][3][sources] [0 KB]
- [Ubuntu 14.04 PPA Repository][4][ubuntu_deb] [0 KB]
- [Arch Linux binary][5][binary] [0 KB]
--------------------------------------------------------------------------------
via: http://news.softpedia.com/news/Budgie-Desktop-5-1-Is-a-Superb-New-Desktop-Environment-For-Conservative-Users-451477.shtml
原文作者:[Silviu Stahie][a]
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://news.softpedia.com/editors/browse/silviu-stahie
[1]:https://launchpad.net/~sukso96100/+archive/ubuntu/budgie-desktop
[2]:https://evolve-os.com/2014/07/20/budgie-desktop-v5-1-released/
[3]:https://github.com/evolve-os/budgie-desktop/
[4]:https://launchpad.net/~sukso96100/+archive/ubuntu/budgie-desktop?field.series_filter=trusty
[5]:https://aur.archlinux.org/packages/budgie-desktop-git

View File

@ -0,0 +1,59 @@
The Native Dropbox Linux Client Debuts New Qt Interface
================================================================================
**The latest experimental build of the native Dropbox Linux client has debuted with an all new Qt interface.**
Dropbox say that the UI rewrite, which will be used on both Windows and Linux, will fix a large number of long-standing bugs, issues and glitches. The cross-platform toolkit is also set to improve general performance.
Alongside an all new setup wizard and login screen (see below) is a handful of redesigned splash screens.
![Login Screen ](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/dropbox-qt-login.jpg)
Login Screen
![Setup Screen](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/dropbox-qt-set-up.jpg)
Setup Screen
![Congratulations Screen ](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/dropbox-qt-finished.jpg)
Congratulations Screen
### Not Stable Yet ###
Dropbox developers caution that since much of the new interface “is still rough around the edges” testers should expect to encounter various visual bugs while using it. The new UI does not yet work with accessibility tools like screen readers.
![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/dropbox-linux-clients-old-and-new.jpg)
The new UI uses (for now) the stock Qt theme. This isnt ugly per se, but it does look a little out of place on the Ubuntu desktop, especially compared to previous builds. Memory usage is also reportedly higher, in some cases jumping from 60MB when idle to more than 178MB. Those on low-end devices should resist the temptation to try this build — at least until this particular bug has been addressed.
Full change log for Dropbox 2.11.0 (Experimental) for Linux:
- Rewrite of the Windows & Linux UI in Qt
- File identifiers detect when files have been moved/renamed
- New setup/login experience
- Faster uploads for small files
- New splash screens
### Download Dropbox Linux Build 2.11.x ###
To try the experimental builds just download the correct archive for your system using the links below.
- [Dropbox Experimental (64bit) Offline Linux Installer][1]
- [Dropbox Experimental (32bit) Offline Linux Installer][2]
Once downloaded, extract the archive to your Home folder. Its hidden by default, so using the Terminal, `cd` into the `.dropbox-dist/dropbox-lnx` folder and run `./dropbox start`.
Dropbox terminal navigation gif:
![](http://i.imgur.com/5TeYXEm.gif)
--------------------------------------------------------------------------------
via: http://www.omgubuntu.co.uk/2014/07/dropbox-experimental-linux-build-qt-rewrite
原文作者:[Joey-Elijah Sneddon][a]
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:https://plus.google.com/117485690627814051450/?rel=author
[1]:https://d1ilhw0800yew8.cloudfront.net/client/dropbox-lnx.x86_64-2.11.0.tar.gz
[2]:https://d1ilhw0800yew8.cloudfront.net/client/dropbox-lnx.x86-2.11.0.tar.gz

View File

@ -1,78 +0,0 @@
The history of Android
================================================================================
![Left: the Milestone 5 home screen showing the “all" button, two dock icons, and four recent apps. Center: the home screen with the app list open. Right: the power menu.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/homescree052n.jpg)
Left: the Milestone 5 home screen showing the “all" button, two dock icons, and four recent apps. Center: the home screen with the app list open. Right: the power menu.
Photo by Ron Amadeo
### Android 0.5, Milestone 5—the land of scrapped interfaces ###
The first major Android change came three months after the first emulator release: the "m5-rc14" build. Released in February 2008, “Milestone 5" dumped the stretched-out BlackBerry interface and went with a totally revamped design—Google's first attempt at a finger-friendly interface.
This build was still identified as "Android 0.5" in the browser user agent string, but Milestone 5 couldn't be more different from the first release of Android. Several core Android features can directly trace their lineage back to this version. The layout and functionality of the notification panel was almost ready to ship, and, other than a style change, the menu was present in its final form, too. Android 1.0 was only eight months away from shipping, and the basics of an OS were starting to form.
One thing that was definitely not in its final form was the home screen. It was an unconfigurable, single-screen wallpaper with an app drawer and dock. App icons were bubbly, three-color affairs, surrounded by a square, white background with rounded corners. The app drawer consisted of an "All" button in the lower-right corner, and tapping on it expanded the list of apps out to the left. Above the "All" button was a two icon dock where "Contacts" and "Dialer" were given permanent home screen real estate. The four blocks above that were an early version of Recent Apps, showing the last apps accessed. With no left or right screens and a whole column taken up by the dock and recent apps, this layout only allowed for 21 app squares before the screen would be filled. The emulator still only sported the bare-minimum app selection, but in an actual device, this design didn't appear like it would work well.
Holding down the "end call" button brought up a super early version of the power menu, which you can see in the rightmost picture. Google didn't have the normal smartphone nomenclature down yet: "Turn Off Screen" would best be described as "Lock screen" (although there was no lock screen) and "Turn Off Radio" would be called "Airplane mode" today.
![From left to right: the surprisingly modern notification panel, the menu open in Google Maps (Maps doesn't work anymore), and the new finger-friendly list view.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/noti2.png)
From left to right: the surprisingly modern notification panel, the menu open in Google Maps (Maps doesn't work anymore), and the new finger-friendly list view.
Photo by Ron Amadeo
All the way back in Milestone 5, Google had the basics of the notification panel nailed down. It pulled down from the top of the screen just like it does on any modern smartphone. Current notifications displayed in a list. The first version of the notification panel was an opaque white sheet with a ribbed “handle" on the bottom and an orange dot in the center. Notifications were pressable, opening the appropriate app for that notification. No one bothered to vertically align the app icons in this list, but that's OK. This was gone in the next update.
Sticky notifications went into an "ongoing" section at the top of the panel. In this build, that seemed to only include phone calls. The "Latest Event" notifications were clearable only after opening the appropriate app. Users surprisingly managed to sign in to Google Talk over the built-in XMPP connection. But while the notification panel displayed "new chat message," there wasn't actually an instant messaging app.
The artwork in Milestone 5 was all new. The app icons were redrawn, and the menu switched from a boring BlackBerry-style text list to full-color, cartoony icons on a large grid. The notification panel icons switched from simple, sharp, white icons to a bubbly green design. There was now a strange black line under the signal bar indicator with no apparent purpose. The tiny list view from earlier builds really wasn't usable with a finger, so Milestone 5 came with an overall beefier layout.
![The dialer, recent calls, and an incoming call.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/phonestuff.png)
The dialer, recent calls, and an incoming call.
Photo by Ron Amadeo
M5 was the first build to have a dialer, albeit a fairly ugly one. Numbers were displayed in a gradient-filled bar containing a bizarre speech-bubble-styled backspace button that looked like it was recycled from some other interface. Alignment issues were everywhere. The numbers on the buttons weren't vertically aligned correctly, and the “X" in the backspace button wasnt aligned with the speech bubble. You couldn't even start a call from the dialer—with no on-screen “dial" button, a hardware button was mandatory.
Milestone 5 had a few tabbed interfaces, all of which demonstrated an extremely odd idea of how tabs should work. The active tab was white, and the background tabs were black with a tiny strip of white at the bottom. Were background tabs supposed to "shrink" downward? There was no animation when switching tabs. It wasn't clear what the design tried to communicate.
Recent Calls, shown in the second picture, was downgraded from a top-tier app to a tab on the dialer. It ditched the crazy crosshair UI from earlier builds and, thanks to the chunkier list view, now displayed all the necessary information in a normal list.
Unlike the dialer, the incoming call screen had on-screen buttons for answering and ending a call. Bizarrely, the incoming call screen was stuck to the bottom of the display, rather than the top or center. It was possibly left over from the old 4:3 BlackBerry screens.
![An active call, the disabled touchscreen error message, and the call screen with a second call on hold.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/callsstuff.png)
An active call, the disabled touchscreen error message, and the call screen with a second call on hold.
Photo by Ron Amadeo
The in-call interface looked normal but made zero sense in practice. Today, to stop your face from pressing buttons while on a call, phones have proximity sensors that turn the screen off when the sensor detects something. Milestone 5 didnt support proximity sensors, though. Googles haphazard solution was to disable the entire touch screen during a call. At the same time, the in-call screen was clearly overhauled for touch. There were big, finger-friendly buttons; *you just couldn't touch anything*.
M5 featured a few regressions here from the old Milestone 3 build. Many decent-looking icons from the old interface were replaced with text. Buttons like "mute" no longer offered on-screen feedback that they were active. Merging calls was cut completely.
![The browsers primary menu, the browsers secondary menu, the crazy zoom control, and the window interface.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/browser4.png)
The browsers primary menu, the browsers secondary menu, the crazy zoom control, and the window interface.
Photo by Ron Amadeo
The browser menu got the usual touch overhaul, and for the first time a "more" button appeared. It functioned as an [extra menu for your menu][1]. Rather than turning the 3x2 grid into a 3x4 grid, Milestone 5 (and many successive versions of Android) used a long, scrolling list for the additional options. Pinch zoom wasn't supported (supposedly a [concession to Apple][2]), so Android went with the ridiculous looking zoom control in the third picture above. Rather than something sensible like a horizontal, bottom-aligned zoom control, Google stuck it smack in the middle of the screen. The last picture shows the Browsers "window" interface, which allowed you to open multiple webpages and semi-easily switch between them.
![Google Maps layers section screen, search interface, and directions screen.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/amps.png)
Google Maps layers section screen, search interface, and directions screen.
Photo by Ron Amadeo
Google Maps still didn't work, but the little UI we accessed saw significant updates. You could pick map layers, although there were only two to choose from: Satellite and Traffic. The top-aligned search interface strangely hid the status bar, while the bottom-aligned directions didn't hide the status bar. Direction's enter button was labeled with "Go," and Search's enter button was labeled with a weird curvy arrow. The list goes on and demonstrates old school Android at its worst: two functions in the same app that should look and work similarly, but these were implemented as complete opposites.
----------
![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg)
[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work.
[@RonAmadeo][t]
--------------------------------------------------------------------------------
via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/2/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://i.imgur.com/GIYGTnb.jpg
[2]:http://www.businessinsider.com/steve-jobs-on-android-founder-andy-rubin-big-arrogant-f-2013-11
[a]:http://arstechnica.com/author/ronamadeo
[t]:https://twitter.com/RonAmadeo

View File

@ -1,3 +1,4 @@
zpl1025
Super Pi Brothers
================================================================================
I don't game as much as I used to. Although I've certainly spent countless hours of my life in front of a Nintendo, SNES, or after that, playing a first-person shooter on my computer (Linux only, thank you), these days, my free time tends to go toward one of the many nongaming hobbies I've accumulated. Recently though, I found myself dusting off my Wii console just so I could play an NES and SNES game I re-purchased for it. The thing is, those games require using a somewhat strange controller, and I already have a modified SNES controller that can connect over USB. That was enough to encourage me to search for a better solution. Of course, I simply could connect three or four consoles and stack up games in my living room, but I've grown accustomed to ripping my CDs and DVDs and picking what I want to listen to or watch from a central media center. It would be nice if I didn't have to get up and find a cartridge every time I wanted to switch games. This, of course, means going with emulation, but although in the past I'd had success with a modified classic Xbox, I didn't have that hardware anymore. I figured someone must have gotten this set up on the Raspberry Pi, and sure enough, after a brief search and a few commands, I had a perfect retro-gaming arcade set up on a spare Raspberry Pi.
@ -67,4 +68,4 @@ via: http://www.linuxjournal.com/content/super-pi-brothers
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://blog.petrockblock.com/retropie
[2]:https://github.com/petrockblog/RetroPie-Setup
[2]:https://github.com/petrockblog/RetroPie-Setup

View File

@ -1,59 +0,0 @@
Love-xuan 翻译中
How to Install Lightweight Budgie Desktop in Ubuntu 14.04
================================================================================
**If you follow us over on Twitter you may have caught a glimpse of a screenshot we shared recently, along with the invitation to name the desktop environment pictured. **
Did you guess correctly? The answer is [Budgie][1] — a simple desktop designed for, but not exclusive to, an openSUSE-based Linux distribution called Evolve OS.
![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/BsCvTxJIcAAPjUR.png-large.png)
We first wrote about Budgie back in March and were suitably bowled over by both the clean, minimal aesthetic and nimble framework, but also by the decision to reuse common components and the standard stack of GNOME 3.10 technologies readily available in most modern distributions.
Im a huge admirer of the development choices taken by the project lead, Ikey Doherty. Theres no denying that forking has its merits, but by deciding to favour upstream projects whole project is able to move faster, both development-wise (less technical debt) and in being available for users (easier to run on other distributions).
Politics of choice aside, the desktop is clean and minimal with a nod to the Ash desktop of Googles Chrome OS. If you dont mind a few rough edges, its well worth a play with. But how do you install Budgie on Ubuntu?
### Unofficial PPA is Unofficial ###
Open source being what it is means if you have a bit of terminal know-how you can grab the source and get it up and running with a bit of wily compiling.
But if youre too lazy for that and happen to be running Ubuntu 14.04 LTS (or a distro based on it) you can get it the easy way.
Just add one **unofficial PPA**, refresh your Software Sources and then install. A few minutes later and youll have both a new uncle in the family by the [name of Bob][2] and a new desktop shell to play with.
### Add the Budgie PPA ###
With a terminal window open copy and paste the following commands carefully, entering your password when/if prompted:
sudo add-apt-repository ppa:sukso96100/budgie-desktop
sudo apt-get update && sudo apt-get install budgie-desktop
### Log into the Budgie Session ###
After installation youll be able to select Budgie from the session selector of the Unity Greeter. (Dont forget to change this back to a stable DE at a later date.)
### Notes ###
**Budgie is not stable, finished nor is it officially supported on Ubuntu**. It is in active development and features remain missing, including, but not limited to: no network management support, no volume control applet (keyboard keys will work fine), no notification system and no way to pin apps to the task bar.
It also doesnt play too nicely with Ubuntus overlay scrollbars, some GTK themes, and session management (e.g., logout, restart, etc.) on distributions using Upstart (like Ubuntu, [though thats changing][3]) does not work.
As a workaround you can disable overlay scrollbars, set a different default theme and quit a session from the terminal using the following command:
gnome-session-quit
With all of those caveats in mind, Id suggest those whose sanity hinges on a stable, dependable system avoid using it for now.
But for the rest of you crazy folks? Well, let us know what you think of it in the comments below. Im off to let Bob in.
--------------------------------------------------------------------------------
via: http://www.omgubuntu.co.uk/2014/07/install-budgie-evolve-os-desktop-ubuntu-14-04
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.omgubuntu.co.uk/2014/03/budgie-desktop-chrome-os-like
[2]:http://en.wikipedia.org/wiki/Bob
[3]:http://www.omgubuntu.co.uk/2014/02/ubuntu-debian-switching-systemd

View File

@ -1,3 +1,4 @@
Love-xuan 翻译中
Display Song Lyrics On Desktop In Ubuntu 14.04
================================================================================
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/07/display_lyrics_desktop_Ubuntu.jpeg)

View File

@ -1,76 +0,0 @@
Linux Kernel Testing and Debugging
================================================================================
### Linux Kernel Testing Philosophy ###
Testing is an integral and important part of any software development cycle, open or closed, and Linux kernel is no exception to that. Developer testing, integration testing, regression, and stress testing have different individual goals, however from 1000 feet up, the end goal is the same, to ensure the software continues to work as it did before adding a new body of code, and the new features work as designed.
Ensuring software is stable without regressions before the release, helps avoid debugging and fixing customer and user found bugs after the release. It costs more in time and effort to debug and fix a customer found problem. Hence, testing is very important in the case of any software, not just the Linux kernel. Unlike closed and proprietary operating systems, the development process is open and is not locked down. This process is its strength as well as weakness. With several developers continuing to add new features, and fixing bugs, continuous integration and testing is vital to ensure the kernel continues to work on existing hardware as new hardware support and features get added. In the open source development, developers and users share the testing responsibility. This is another important difference between a closed development model and an open one.
Almost all Linux kernel developers, if not all, are very active Linux users themselves. There is no requirement that testers should be developers, however, users and developers that are not familiar with the new code could be more effective at testing a new piece of code than the original author of that code. In other words, developer testing serves as an important step in verifying the functionality, however, developer testing alone is not sufficient to find interactions with other code, features, and unintended regressions on configurations and/or hardware, developer didn't anticipate and didn't have the opportunity and resources to test. Hence, users play a very important role in the Linux Kernel development process.
So now that we understand the importance of continuous integration testing, we will go into the details of testing itself. Before we talk about testing, I would like to walk through the development process itself to help understand how it works and how the changes funnel into the mainline kernel.
3000+ kernel developers from around the world contribute to the Linux kernel. It is a 24hours, seven days a week, and 365 days of continuous development process that results in a new release once every 2+ months and several stable and extended stable releases. New development and current release integration cycles run in parallel.
For further reading on the development process, please refer to [Greg Kroah-Hartman's presentation on the Linux Kernel Development][1].
It is my intent that this guide should be useful to a beginner as well as an experienced contributor and/or individuals interested in getting involved in the Linux kernel development. Experienced developers can chose to skip sections that go over basic testing and debugging.
This paper will discuss how to test and debug Linux kernel, tools, scripts and debug mechanisms that aid in regression and integration testing. In addition, this paper will go into details on how to use git bisect to isolate a patch that introduced a bug, and what to test before sending patches to the Linux Kernel Mailing List. I will use Linux PM as an example target area for the testing and debugging discussion. Even though this paper is Linux Kernel testing focused, the importance of testing is applicable to any software project.
### Configuring Development and Test System ###
Let's get started. First order of business is finding a development system that suits your needs. x86-64 systems are a good choice for a basic development system, unless there is a need for a specific architecture and/or configuration.
The second step is to install distribution of your preference. I prefer Ubuntu, hence this document will have the details on how to configure a kernel development system running Ubuntu distribution. Please follow [How to Ubuntu][2] for installing the Ubuntu release of your choice.
On development and test systems, it is a good idea to ensure there is ample space for kernels in the boot partition. Choosing whole disk install or setting aside 3 GB disk space for the boot partition is recommended.
Once the distribution is installed and the system is ready for development packages, enable root account and also enable sudo for your user account. The system might already have the build-essential package which is what you need to build Linux kernels on an x86_64 system. If build-essential is not already installed, run the following command to install it:
sudo apt-get install build-essential
At this point, you may install the following packages as well, so the system is ready for cross-compiling Linux kernels. Note that ncurses-dev is a required package to run make menuconfig.
sudo apt-get install binutils-multiarch
sudo apt-get install ncurses-dev
sudo apt-get install alien
Now let's install a few tools every Linux kernel developer need in his/her tool chest.
sudo apt-get install git
sudo apt-get install cscope
sudo apt-get install meld
sudo apt-get install gitk
If you would like to get the system configured for cross-compiling other supported architectures non-natively on your x86-64 system, please follow: [Cross-compiling Linux kernel on x86 64][3].
The Stable Kernel
Start by cloning the stable kernel git, building and installing the latest stable kernel. You can find information on the latest stable and mainline releases at [The Linux Kernel Archive][4].
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
The above step will create a new directory named linux-stable and populate it with the sources.
You can also download just the Linux Kernel source tar-ball instead of cloning the git, and then unpack the tar-ball.
tar xvf linux-3.x.y.tar.xz
--------------------------------------------------------------------------------
via: http://www.linuxjournal.com/content/linux-kernel-testing-and-debugging?page=0,0
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://events.linuxfoundation.org/images/stories/pdf/als2012_gregkh.pdf
[2]:http://howtoubuntu.org/
[3]:http://linuxdriverproject.org/mediawiki/index.php/Cross-compiling_Linux_kernel_on_x86_64
[4]:https://www.kernel.org/

View File

@ -1,3 +1,4 @@
[bazz2 so handsome]
Linux Kernel Testing and Debugging
================================================================================
### Compiling and Installing Stable Kernel ###
@ -104,4 +105,4 @@ via: http://www.linuxjournal.com/content/linux-kernel-testing-and-debugging?page
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,185 @@
How to manage DigitalOcean VPS droplets from the command line on Linux
================================================================================
[DigitalOcean][1] is one of the [hottest][2] new kids in the block in the cloud VPS hosting market. While not offering as comprehensive service portfolio as Amazon Web Services and the likes, DigitalOcean is already a strong contender for the best Linux-based cloud VPS service targeted at small businesses and developers, thanks to their competitive pricing and user-friendly management interface.
![](https://farm4.staticflickr.com/3841/14501627500_2ef275ac1c_z.jpg)
Whenever you need a web-facing server for your personal project, you can quickly spin up a "droplet" (nickname for a VPS instance at [DigitalOcean][3]). And kill it when it's not needed. No need to burn a hole in your pocket as you are charged for its up time. While DigitalOcean's web-based management interface is streamlined already, for those of you who are die-hard fans of command-line interface (CLI), there is a CLI-based droplet management tool called [Tugboat][4]. Thanks to this CLI tool, any complex droplet management task can easily be turned into a script.
In this tutorial, I am going to describe **how to use Tugboat to manage DigitalOcean dropets from the command line**.
### Install Tugboat on Linux ###
To install Tugboat on Debian, Ubuntu or Linux Mint:
$ sudo apt-get install ruby-dev
$ sudo gem install tugboat
To install Tugboat on Fedora:
$ sudo yum install ruby-devel
$ sudo gem install tugboat
To install Tugboat on CentOS, first [install or upgrade to the latest Ruby][5], because on CentOS 6.5 and earlier, the default Ruby does not meet the minimum version requirement (1.9 and higher) for Tugboat. Once you install Ruby 1.9 and higher, install Tugboat as follows.
$ sudo gem install tugboat
### Configure Tugboat for the First Time ###
After installation, it's time to go through one-time configuration, which involves authorizing Tugboat to access your DigitalOcean account.
Go to [https://cloud.digitalocean.com/api_access][6], and create a new API key. Make a note of client ID and API key.
![](https://farm4.staticflickr.com/3836/14688299215_fd282a0142_z.jpg)
Start authorization process by running:
$ tugboat authorize
When prompted, enter your client ID and API key. It will ask you several other questions. You can accept default answers for now. We are going to customize the default settings later anyway.
[![](https://farm6.staticflickr.com/5596/14685122101_dba50fc86b_z.jpg)][7]
Now let's customize default droplet settings to reflect your typical use cases. For that, first check available droplet offerings (e.g., available images, regions, sizes).
Running the command below will show you a list of available droplet images. Pick a default image to use, and make a note of the corresponding ID.
$ tugboat images --global
![](https://farm3.staticflickr.com/2900/14688299175_e77e74fa1e_z.jpg)
Similarly, pick a default geographic location from available regions:
$ tugboat regions
Also, choose a default droplet size from available RAM sizes:
$ tugboat sizes
![](https://farm4.staticflickr.com/3858/14501661238_4304e8bdfb_o.png)
Now put your default choices in ~/.tugboat. For example, here I customize my default settings to 512MB Ubuntu 14.04 x64 to be created in New York region. Set "ssh_user" to root if you want to enable SSH via key authentication, which will be described shortly.
$ vi ~/.tugboat
----------
---
authentication:
client_key: XXXXXXXXXXXXXXXXXXX
api_key: XXXXXXXXXXXXXXXXXXXX
ssh:
ssh_user: root
ssh_key_path: /home/dev/.ssh/id_rsa
ssh_port: '22'
defaults:
region: '4'
image: '3240036'
size: '66'
ssh_key: ''
private_networking: 'false'
backups_enabled: 'false'
### Create and Add SSH Key to DigitalOcean ###
A secure way to access your droplet instance is to SSH to the instance via [key authentication][8].
In fact, you can automatically enable key authentication for your droplets by registering your SSH public key with [DigitalOcean][9]. Here is how to do it.
First, generate a private/public SSH key pair (if you don't have one).
$ ssh-keygen -t rsa -C "your@emailaddress.com"
Assuming that the generated key pair consists of: ~/.ssh/id_rsa (private key) and ~/.ssh/id_rsa.pub (public key), go ahead and upload your public key by running:
$ tugboat add-key [name-of-your-key]
You can give your key any name you like (e.g., "my-default-key"). When prompted, enter the path to your public key (e.g., /home/user/.ssh/id_rsa.pub). After key uploading is completed, verify the key is successfully added by running:
$ tugboat keys
![](https://farm4.staticflickr.com/3869/14501853397_3d3f4365b1_z.jpg)
The key should also appear in DigitalOcean's [SSH key page][10]. If you want the key to be automatically used for your droplets, add the ID of your key to ~/.tugboat.
ssh_key: '182710'
### Basic Usage of Tugboat ###
Here are a few basic use cases of tugboat command line.
1. Create a new droplet with default settings.
$ tugboat create <name-of-droplet>
2. Show a list of all active droplets.
$ tugboat droplets
3. Display information about a droplet.
$ tugboat info <name-of-droplet>
[![](https://farm6.staticflickr.com/5593/14501627440_5835506d2a_z.jpg)][11]
4. Shutdown a droplet, and remove its image.
$ tugboat destroy <name-of-droplet>
5. Shutdown a droplet, but keep its image
$ tugboat halt <name-of-droplet>
6. Take a snapshot of a droplet. The droplet must be turned off first.
$ tugboat snapshot <snapshot-name> <name-of-droplet>
7. Resize (increase or decrease the RAM size of) a droplet. The droplet must be shutdown first.
$ tugboat resize <name-of-droplet> -s <image-id>
If you want to know more about a particular command option, run:
$ tugboat help <command>
![](https://farm4.staticflickr.com/3900/14688013322_4fa6080c5e_z.jpg)
### Troubleshooting ###
1. When I run tugboat command, it fails with the following error.
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /usr/lib/ruby/gems/1.8/gems/tugboat-0.2.0/lib/tugboat/cli.rb:12: syntax error, unexpected ':', expecting kEND (SyntaxError)
Tugboat requires Ruby 1.9 and higher. You need to upgrade Ruby to solve this problem. For CentOS, refer to [this tutorial][12].
2. When I try to install Tugboat with gem, I get the following error.
/usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- json/pure (LoadError)
Install the following gem to fix the problem.
$ sudo gem install json_pure
--------------------------------------------------------------------------------
via: http://xmodulo.com/2014/07/manage-digitalocean-vps-droplets-command-line-linux.html
原文作者:[Dan Nanni][a]
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://xmodulo.com/author/nanni
[1]:http://xmodulo.com/go/digitalocean
[2]:http://news.netcraft.com/archives/2013/12/11/digitalocean-now-growing-faster-than-amazon.html
[3]:http://xmodulo.com/go/digitalocean
[4]:https://github.com/pearkes/tugboat
[5]:http://ask.xmodulo.com/upgrade-ruby-centos.html
[6]:https://cloud.digitalocean.com/api_access
[7]:https://www.flickr.com/photos/xmodulo/14685122101/
[8]:http://xmodulo.com/2012/04/how-to-enable-ssh-login-without.html
[9]:http://xmodulo.com/go/digitalocean
[10]:https://cloud.digitalocean.com/ssh_keys
[11]:https://www.flickr.com/photos/xmodulo/14501627440/
[12]:http://ask.xmodulo.com/upgrade-ruby-centos.html

View File

@ -0,0 +1,80 @@
安卓编年史 02
=============================================================================
![Left: the Milestone 5 home screen showing the “all" button, two dock icons, and four recent apps. Center: the home screen with the app list open. Right: the power menu.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/homescree052n.jpg)
左边:里程碑 5主屏幕展示了“All”按钮两个dock图标以及最近使用的四个应用。中间主屏幕与打开的应用程序列表。右边电源菜单。
图片来自@Ron Amadeo
Android0.5, 里程碑 5——如今已经是报废接口的领地了 -
“M5-RC14”构建后也就是第一个仿真器发布三个月之后Android迎来了她的首次重大革新。 2008年2月发布的“里程碑5”甩掉了发展中的黑莓界面走向一个完全革新的设计——谷歌在手指触摸技术的第一次尝试。
由于浏览器的用户代理字符串的使用此版本仍然被识别为“Android0.5”,但里程碑 5与Android的第一个版本相比已经完全不一样了。几个核心的Android功能直接追踪他们的血统最终还是会回到这个版本。通知面板的布局和功能几乎已经整装待发并且除了样式变化外菜单同样也存在于它的最终组成。安卓1.0距离该项目起航的时间仅仅只有八个月,一个操作系统的基础已经开始形成了。
有一件东西绝对不会存在于最后的组成,那就是是主屏幕。这是一个不可配置的,单屏壁纸的应用程序的架子和空位。【译者注:"an app drawer and dock",度娘直接是"应用程序的抽屉和码头,",没有搜到相关专业的词汇,求指点,感激。zsky@live.com】应用程序图标是天真活泼的三种颜色的组合由一个方形的、有圆角的白色背景包围着。应用程序的架子由在右下角的一个“All”按钮组成轻按它扩展的应用程序列表显示在了左边。这个“All”按钮正上面的是两个图标空位“联系人”和“拨号器”分别获得了专属的永久主屏幕位置。然后上边有四个板块它们是最近应用程序的早期版式展示了最后访问的应用程序。没有了左画面或右画面基座和最近的应用程序占用一整列这种布局下21个正方形的应用程序才会填充满整个屏幕。模拟器仍然只选择同等最小的应用程序但在实际的设备中这样的设计并产生没有很好地工作效果。
按住“end call”按钮会出现一个超级早期版本的电源菜单您可以在最右边的图片中看到的。谷歌迄今为止没有正常的智能手机命名术语对于“Turn Off Screen”最好地形容也许是“Lock screen”虽然当时没有锁屏和“Turn Off Radio”在今天被叫做“Airplane Mode”。
![From left to right: the surprisingly modern notification panel, the menu open in Google Maps (Maps doesn't work anymore), and the new finger-friendly list view.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/noti2.png)
从左至右依次为:令人惊喜的现代版通知面板,谷歌地图的菜单在打开着(地图已经不可用了),和新的适合手指操作的列表视图。
照片来自@Ron Amadeo
所有的方式都会回溯到里程碑 5谷歌在那时就毫无疑问拥有通知面板的基本知识储备。就像在任何现代的智能手机里看到的一样它能够从屏幕顶部下拉下来。目前的通知都显示在列表中。通知面板的第一个版本是不透明的白色薄片带着棱纹的的“handle”在底部一个橙色的圆点在中心。通知是可触的通过触摸可以打开该通知关联的应用程序。没有人被在此列表中垂直对齐的应用程序图标所困扰不过也没关系随着在接下来的更新它已经是过去式了。
点一下通知进入一个在面板顶部的“on going”部分。在这个版本这里似乎只包含打电话。在“Latest Event”里的通知只有打开相应的应用程序后才是清楚的。用户令人惊喜的通过内置的XMPP连接成功登录到谷歌talk。不过虽然通知面板中显示“new chat message其实这里并没有没有真正的即时消息应用程序。
里程碑 5里的艺术设计全部都是新的。该应用程序图标被重新绘制并且菜单从一个无聊的黑莓风格的文本列表转变为一个大格全彩色、卡通的图标。通知面板图标也从简单的、突兀的、白色的图标切换到一个天真活泼的绿色设计。当时在信号栏指示器下边有一个奇怪的黑线几乎没有作用。早期开发版本的微小列表视图不适合手指使用所以里程碑 5开发了全面强大的整体布局。
![The dialer, recent calls, and an incoming call.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/phonestuff.png)
拨号器,最近通话,和来电接听。
照片来自@Ron Amadeo
M5是第一个有一个拨号器的版本即使她是一个相当难看的版本。数字被显示在包含一个奇怪的语音气泡风格的退格键里看上去就像是从其他界面回收回来的。对齐问题随处可见。按钮上的数字没有正确的垂直排列而且退格键的“X”也没有与对话框对齐。由于屏幕上没有的“dial”按钮你甚至不能从拨号程序打个电话一个硬件按钮也被托管了。
里程碑 5 有几个选项卡式界面所有这些都表明了一个非常奇怪的想法标签应该如何工作。活跃的标签是白色的而背景标签是拥有一小条白色在其边沿的黑色。后台标签应该是向下的“shrink”吗切换标签时是没有动画的。目前还不清楚这个设计试图想表达什么。
在第二张图片中显示的最近通话记录项是从顶级的应用程序降级到拨号器选项卡的。它丢弃了早期版本的疯狂十字丝UI多亏了大块列表视图现在所有必要的信息都是显示在一个正常的列表。
不同于拨号器来电画面只有即时屏幕上的按钮来接听和结束通话。奇怪的是来电屏幕贴在显示器的底部而不是顶部或中心。它可能是从旧的黑莓4:3屏幕遗留下来的。
![An active call, the disabled touchscreen error message, and the call screen with a second call on hold.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/callsstuff.png)
通话中,触摸屏不可用的显示错误信息,和暂停通话的第二个呼叫的呼叫屏幕。
照片来自@Ron Amadeo
通话中界面看起来正常,但在实践中毫无意义。今天,在通话中为了阻止你的脸按到屏幕按钮,手机近距离传感器一旦检测到相关信息会快速关闭屏幕。虽然里程碑 5不支持近距离传感器。谷歌的杂乱无章的解决方案是在通话过程中禁止整个触摸屏。与此同时通话中的屏幕显然会彻底检查触摸功能。这时候是有大的可触摸的按钮; *就是不让你摸!!*
M5在这里让旧里程碑3版本的几个回归者占据特色地位。许多旧的接口里有体面相貌的图标被替换成了文本。像“mute”按钮不再提供屏幕上的反馈过去他们是活跃的。合并通话被完全切掉了。
![The browsers primary menu, the browsers secondary menu, the crazy zoom control, and the window interface.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/browser4.png)
浏览器的主要菜单,浏览器的二级菜单,疯狂的变焦控制和窗口界面。
照片来自@Ron Amadeo
浏览器菜单中得到了一贯的触摸功能大修理并且“more”按钮第一次出现。它充当一个[extra menu for your menu] [1]。而不是转动3x2的网格成3x4的网格里程碑 5和Android的许多后续版本一样中使用很长的、滚动的列表来引出其他选项。不支持双指缩放据说是[concession to Apple] [2]因此Android运行着可笑的变焦控制外表在上边第三张图片。而不是理智的比如是一个水平的、底部对齐变焦的控制谷歌控制它直接出现在屏幕的中间。最后一张图片显示浏览器的“window”界面允许你打开多个网页和两者之间轻松切换。
![Google Maps layers section screen, search interface, and directions screen.](http://cdn.arstechnica.net/wp-content/uploads/2013/12/amps.png)
谷歌地图的层级部分的屏幕,搜索界面,并指示屏幕。
照片来自@Ron Amadeo
谷歌地图仍然不能使用但我们访问的小小UI却有了显著更新。你可以挑选地图图层虽然只有两种可以选择卫星和交通。顶部对齐的搜索界面隐藏了奇怪的状态栏而底部对齐方向没有隐藏状态栏。指示的输入按钮被标有“Go”而且搜寻的输入按钮被标有一个奇怪的弯曲的箭头。这样的例子不胜枚举并演示了老同学的Android在最坏时候的情况在同一个应用程序它的外观和工作方式类似的两个功能但这些都实现为完全相反的方向。
----------
![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg)
[Ron Amadeo][a] / Ron是Ars Technica的评论编辑他专注于Android操作系统和谷歌的产品。他总是在寻找一个新的小工具喜欢分解事物来看看它们是如何工作的。
[@RonAmadeo][t]
-------------------------------------------------- ------------------------------
via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/2/
译者:[cereuz](https://github.com/cereuz)邮箱:[cereuz](mailto:sunedo@qq.com)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://i.imgur.com/GIYGTnb.jpg
[2]:http://www.businessinsider.com/steve-jobs-on-android-founder-andy-rubin-big-arrogant-f-2013-11
[a]:http://arstechnica.com/author/ronamadeo
[t]:https://twitter.com/RonAmadeo

View File

@ -1,26 +1,24 @@
Translating by cvsher
7 dmesg Commands for Troubleshooting and Collecting Information of Linux Systems
================================================================================
The dmesg command displays the messages from the kernel ring buffer. A system passes multiple runlevel from where we can get lot of information like system architecture, cpu, attached device, RAM etc. When computer boots up, a kernel (core of an operating system) is loaded into memory. During that period number of messages are being displayed where we can see hardware devices detected by kernel.
在linux系统中处理故障和收集系统信息的7种dmesg的用法
==========================================================
dmesg命令显示linux内核的环形缓冲区信息我们可以从中获得诸如系统架构cpu挂载的硬件RAM等多个运行级别的大量的系统信息。当计算机启动时系统内核操作系统的核心部分将会被加载到内存中。在加载的过程中会显示很多的信息在这些信息中我们可以看到内核检测硬件设备。
![dmesg Command Examples](http://www.tecmint.com/wp-content/uploads/2014/07/dmesg-Command-Examples.png)
dmesg Command Examples
dmesg 命令的使用范例
The messages are very important in terms of diagnosing purpose in case of device failure. When we connect or disconnect hardware device on the system, with the help of dmesg command we come to know detected or disconnected information on the fly. The dmesg command is available on most **Linux and Unix** based Operating System.
dmesg命令设备故障的诊断是非常重要的。在dmesg命令的帮助下进行硬件的连接或断开连接操作时我们可以看到硬件的检测或者断开连接的信息。dmesg命令在多数基于**Linux**和**Unix**的操作系统中都可以使用。
Lets throw some light on most famous tool called dmesg command with their practical examples as discussed below. The exact syntax of dmesg as follows.
下面我们展示一些最负盛名的dmesg命令工具以及其实际使用举例。dmesg命令的使用语法如下。
# dmseg [options...]
# dmesg [options...]
### 1. List all loaded Drivers in Kernel ###
### 1. 列出加载到内核中的所有驱动 ###
We can use text-manipulation tools i.e. **more**, **tail**, **less** or **grep** with dmesg command. As output of dmesg log wont fit on a single page, using dmesg with pipe more or less command will display logs in a single page.
我们可以使用如‘**more**’。 **tail**, **less** ’或者‘**grep**的文字处理工具来处理dmesg命令的输出。由于dmesg日志的输出不适合在一页中完全显示因此我们使用管道pipe将其输出送到more或者less命令中进行分页显示。
[root@tecmint.com ~]# dmesg | more
[root@tecmint.com ~]# dmesg | less
#### Sample Output ####
### 输出 ###
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
@ -51,9 +49,9 @@ We can use text-manipulation tools i.e. **more**, **tail**, **les
[ 0.000000] NX (Execute Disable) protection: active
.....
### 2. List all Detected Devices ###
### 列出所有被检测到的硬件 ###
To discover which hard disks has been detected by kernel, you can search for the keyword “**sda**” along with “**grep**” like shown below.
要显示所有被内核检测到的硬盘设备,你可以使用‘**grep**’命令搜索‘**sda**’关键词,如下:
[root@tecmint.com ~]# dmesg | grep sda
@ -70,11 +68,9 @@ To discover which hard disks has been detected by kernel, you can search for the
[ 24.330762] EXT4-fs (sda7): mounted filesystem with ordered data mode. Opts: (null)
[ 24.561015] EXT4-fs (sda8): mounted filesystem with ordered data mode. Opts: (null)
**NOTE**: The sda first SATA hard drive, sdb is the second SATA hard drive and so on. Search with hda or hdb in the case of IDE hard drive.
**注解** sda表示第一块 SATA硬盘sdb表示第二块SATA硬盘。若想查看IDE硬盘搜索hdahdb关键词。
### 3. Print Only First 20 Lines of Output ###
The head along with dmesg will show starting lines i.e. dmesg | head -20 will print only 20 lines from the starting point.
### 3. 只输出dmesg命令的前20行日志 ###
[root@tecmint.com ~]# dmesg | head -20
@ -99,9 +95,9 @@ The head along with dmesg will show starting lines i.e. dmesg | head -2
[ 0.000000] BIOS-e820: [mem 0x000000007dc5cc00-0x000000007dc5ebff] ACPI data
[ 0.000000] BIOS-e820: [mem 0x000000007dc5ec00-0x000000007fffffff] reserved
### 4. Print Only Last 20 Lines of Output ###
### 只输出dmesg命令最后20行日志 ###
The tail along with dmesg command will print only 20 last lines, this is useful in case we insert removable device.
当我们插入可以出的硬件是在dmesg命令后跟随tail命令来输出dmesg命令的最后20行日志是非常有用的。
[root@tecmint.com ~]# dmesg | tail -20
@ -126,17 +122,16 @@ The tail along with dmesg command will print only 20 last lines, this is u
readahead-collector: sorting
readahead-collector: finished
### 5. Search Detected Device or Particular String ###
Its difficult to search particular string due to length of dmesg output. So, filter the lines with are having string like **usb** **dma** **tty** and **memory** etc. The **-i** option instruct to [grep command][1] to ignore the case (upper or lower case letters).
### 5. 搜索包含特定字符串的被检测到的硬件 ###
由于dmesg命令的输出实在太长了在其中搜索某个特定的字符串是非常困难的。因此有必要过滤出一些包含**usb** **dma** **tty** **memory**’等字符串的日志行。[grep 命令][1] 的‘**-i**’选项表示忽略大小写。
[root@tecmint.com log]# dmesg | grep -i usb
[root@tecmint.com log]# dmesg | grep -i dma
[root@tecmint.com log]# dmesg | grep -i tty
[root@tecmint.com log]# dmesg | grep -i memory
#### Sample Output ####
###输出###
[ 0.000000] Scanning 1 areas for low memory corruption
[ 0.000000] initial memory mapped: [mem 0x00000000-0x01ffffff]
[ 0.000000] Base memory trampoline at [c009b000] 9b000 size 16384
@ -159,19 +154,19 @@ Its difficult to search particular string due to length of dmesg output. So,
[ 1.360318] Freeing unused kernel memory: 880K (c1962000 - c1a3e000)
[ 1.429066] [drm] Memory usable by graphics device = 2048M
### 6. Clear dmesg Buffer Logs ###
### 6. 清空dmesg缓冲区日志 ###
Yes, we can clear dmesg logs if required with below command. It will clear dmesg ring buffer message logs till you executed the command below. Still you can view logs stored in **/var/log/dmesg** files. If you connect any device will generate dmesg output.
我们可以使用如下命令来清空dmesg的日志。该命令会清空dmesg环形缓冲区中的日志。但是你依然可以查看存储在**/var/log/dmesg**文件中的日志。你连接任何的设备都会产生dmesg日志输出。
[root@tecmint.com log]# dmesg -c
### 7. Monitoring dmesg in Real Time ###
### 7. 实时监控dmesg日志输出 ###
Some distro allows command tail -f /var/log/dmesg as well for real time dmesg monitoring.
在某些发行版中可以使用命令tail -f /var/log/dmesg来实时监控dmesg的日志输出。
[root@tecmint.com log]# watch "dmesg | tail -20"
**Conclusion**: The dmesg command is useful as dmesg records all the system changes done or occur in real time. As always you can man dmesg to get more information.
**结论**dmesg命令在系统dmesg记录实时更改或产生的情况下是非常有用的。你可以使用man dmesg来获取关于dmesg更多的信息。
----------
@ -183,13 +178,13 @@ Narad Shrestha
- [Facebook profile][f]
- [Google+ profile][g]
He has over 10 years of rich IT experience which includes various Linux Distros, FOSS and Networking. Narad always believes sharing IT knowledge with others and adopts new technology with ease.
他在IT领域拥有超过10年的丰富经验其中包括各种Linux发行版开源软件和网络。 Narad始终坚持与人分享知识和自如的运用新技术。
--------------------------------------------------------------------------------
via: http://www.tecmint.com/dmesg-commands/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
译者:[cvsher](https://github.com/cvsher) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
@ -197,3 +192,4 @@ via: http://www.tecmint.com/dmesg-commands/
[t]:http://twitter.com/@nrdshrestha
[f]:http://facebook.com/narad.shrestha.9
[g]:http://plus.google.com/104542109955805873615?rel=author

View File

@ -1,6 +1,6 @@
How to analyze Squid logs with SARG log analyzer on CentOS
如何用CentOS上的SARG log分析其来分析Squid的log
================================================================================
In a [previous tutorial][1], we show how to configure a transparent proxy with Squid on CentOS. Squid provides many useful features, but analyzing a raw Squid log file is not straightfoward. For example, how could you analyze the time stamps and the number of hits in the following Squid log?
[上一节教程][1]中我们战士了如何在CentOS上使用Squid配置透明代理。Squid提供了很多有用的特性但是分析一个原始Squid日志文件并不直接。比如你如何分析下面Squid log中的时间戳和数字
1404788984.429 1162 172.17.1.23 TCP_MISS/302 436 GET http://facebook.com/ - DIRECT/173.252.110.27 text/html
1404788985.046 12416 172.17.1.23 TCP_MISS/200 4169 CONNECT stats.pusher.com:443 - DIRECT/173.255.223.127 -
@ -12,24 +12,24 @@ In a [previous tutorial][1], we show how to configure a transparent proxy with S
1404788990.849 2151 172.17.1.23 TCP_MISS/200 76809 CONNECT fbstatic-a.akamaihd.net:443 - DIRECT/184.26.162.35 -
1404788991.140 611 172.17.1.23 TCP_MISS/200 110073 CONNECT fbstatic-a.akamaihd.net:443 - DIRECT/184.26.162.35
SARG (or Squid Analysis Report Generator) is a web based tool that creates reports from Squid logs. SARG provides an easy-to-understand view of network traffic handled by Squid, and it is very easy to set up and maintain. In the following tutorial, we show **how to set up SARG on a CentOS platform**.
SARG或者说是Squid分析报告生成器是一款基于web的工具用于从Squid日志中生成报告。SARG提供了一个易于理解的由Squid处理的网络流量视图并且它很容易设置与维护。在下面的教程中我们会展示**如何在CentOS平台上设置SARG**。
We start the process by installing necessary dependencies using yum.
我们使用yum来安装安装必要的依赖。
# yum install gcc make wget httpd crond
Necessary services are started and loaded at startup.
在启动时加载必要的服务
# service httpd start; service crond start
# chkconfig httpd on; chkconfig crond on
Now we download and extract SARG.
现在我们下载并解压SARG
# wget http://downloads.sourceforge.net/project/sarg/sarg/sarg-2.3.8/sarg-2.3.8.tar.gz?
# tar zxvf sarg-2.3.8.tar.gz
# cd sarg-2.3.8
**NOTE**: For 64-bit Linux, the source code in log.c needs to be patched as follows.
**注意**: 对于64位的Linuxlog.c的源代码需要用下面的文件打补丁。
1506c1506
< if (fprintf(ufile->file, "%s\t%s\t%s\t%s\t%"PRIi64"\t%s\t%ld\t%s\n",dia,hora,ip,url,nbytes,code,elap_time,smartfilter)<=0) {
@ -44,13 +44,13 @@ Now we download and extract SARG.
---
> printf("LEN=\t%"PRIi64"\n",(int64_t)nbytes);
Go ahead and build/install SARG as follows.
如下继续并编译/安装SARG
# ./configure
# make
# make install
After SARG is installed, the configuration file can be modified to match your requirements. The following is one example of SARG configuration.
SARG安装之后配置文件可以按你的要求修改。下面是一个SARG配置的例子。
# vim /usr/local/etc/sarg.conf
@ -63,19 +63,19 @@ After SARG is installed, the configuration file can be modified to match your re
## we dont want multiple reports for single day/week/month ##
overwrite_report yes
Now it's time for a test run. We run sarg command in debug mode to find whether there is any error.
现在是时候测试运行了我们用调试模式运行sarg来找出是否存在错误。
# sarg -x
If all goes well, sarg should analyze Squid logs, and create reports in /var/www/html/squid-reports. The reports should be visible in a web browser using the address http://<server-IP>/squid-reports/
如果i一切正常sarg会根系Squid日志并在/var/www/html/squid-reports下创建报告。报告也可以在浏览器中通过地址http://<服务器IP>/squid-reports/访问
![](https://farm3.staticflickr.com/2931/14631403935_4ff34e07b9_z.jpg)
![](https://farm4.staticflickr.com/3901/14629281644_fec31014c5_z.jpg)
SARG can be used to create daily, weekly and monthly reports. Time range can be specified using the "-d" parameter with possible values in the form of day-n, week-n or month-n, where n is the number of days/weeks/months to jump backward. For example, with week-1, SARG will generate a report for the previous week. With day-2, SARG will prepare reports for the previous two days.
、SARG可以用于创建每日、每周、每月的报告。时间范围用“-d”参数来指定可能的值的形式可能为day-n、 week-n 或者 month-nn的值向后天/周/月的数量。比如使用week-1,SARG会生成前面一星期的报告。使用day-2,SARG会准备前面两天的报告。
As a demonstration, we will prepare a cron job to run SARG daily.
作为演示我们会准备一个计划任务来每天运行SARG。
# vim /etc/cron.daily/sarg
@ -84,30 +84,31 @@ As a demonstration, we will prepare a cron job to run SARG daily.
#!/bin/sh
/usr/local/bin/sarg -d day-1
The file needs a execution permission.
文件需要可执行权限。
# chmod 755 /usr/local/bin/sarg
Now SARG should prepare daily reports about Squid-managed traffic. These reports can easily be accessed from the SARG web interface.
现在SARG应该会每天准备关于Squid管理的流量报告。这些报告可以很容易地通过SARG网络接口访问。
To sum up, SARG is a web based tool that analyzes Squid logs and presents the analysis in an informative way. System admins can leverage SARG to monitor what sites are being accessed, and to keep track of top visited sites and top users. This tutorial covers a working configuration for SARG. You can customize the configuration even further to match your requirements.
总结一下SARG一款基于网络的工具它可以分析Squid日志并以更详细的方式展示分析。系统管理员可以利用SARG来监视哪些网站被访问了并跟踪访问量最大的网站和用户。本教程涵盖了SARG配置工作。你甚至可以进一步自定义配置来满足您的要求。
Hope this helps.­­­­
希望这篇教程有用
----------
[Sarmed Rahman][w]
- [Twitter profile][t]
- [LinkedIn profile][l]
- [Twitter 地址][t]
- [LinkedIn 地址][l]
Sarmed Rahman is an IT professional in the Internet Industry in Bangladesh. He writes tutorial articles on technology every now and then from a belief that knowledge grows through sharing. During his free time, he loves gaming and spending time with his friends.
Sarmed Rahman是一名在孟加拉国的IT专业人士。他坚持写作科学文章并坚信技术可以通过分享提高。在他的空闲时间里他爱好游戏与他的朋友在一起
--------------------------------------------------------------------------------
via: http://xmodulo.com/2014/07/analyze-squid-logs-sarg-log-analyzer-centos.html
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,76 @@
Linux 内核的测试和调试
================================================================================
### Linux 内核测试哲学 ###
不管是开源还是闭源所有软件的开发流程中测试是一个重要的、不可或缺的环节Linux 内核也不例外。开发人员自测、系统测试、回归测试、压力测试,都有各自不同的目的,但是从更高一个层次上看,这些测试的最终目的又是一样的:保证软件能一直运行下去,当有新功能加进去时,要保证新功能可以正常工作。
在软件释出 release 版之前,不用回归测试就能保证稳定性,并且尽量避免在软件发布后被用户发现 bug。调试被用户发现的 bug 是一项非常浪费时间和精力的工作。因此测试是一项非常重要的工作。不像闭源和专有的操作系统Linux 内核的开发过程是完全开放的。这种处理方式即是它的优点,也是它的缺点。多个开发者持续增加新功能、修 bug、不断集成与测试 —— 当环境有新的硬件或功能时,这种开发方式能够保证内核能持续工作。在开源项目中,开发者与用户共享测试的结果,这也是开源项目与闭源项目之间的一个很重要的差别。
几乎所有 Linux 内核开发者都是活跃的 Linux 用户。内核测试人员不一定非得是内核开发者,相反,用户和开发者如果对新增的代码不是很熟悉,他们的测试效果会比代码开发人员自己测试的效果要好很多。也就是说,开发者的单元自测能验证软件的功能,但并不能保证在其他代码、其他功能、其他软件、硬件环境下面运行时会出现什么问题。开发者无法预料、也没有机会和资源来测试所有环境。因此,用户在 Linux 内核开发过程中起到非常重要的角色。
现在我们已经了解了持续集成测试的重要性,接下来我们会详细介绍测试的知识。但在此之前,我还是向介绍一下开发的过程,以便让大家了解它是怎么工作的,以及如何把补丁打进内核主线。
全世界共有3000多个内核开发者为 Linux 内核贡献代码每天都有新代码添加到内核结果是大概2个月就能产生一个稳定版和多个扩展的稳定版。新功能的开发与已发布的稳定版集成测试流程在同时进行。
关于开发流程的详细描述,请参考[Greg Kroah-Hartman 的 Linux 内核开发的介绍][1]。
这份教程适合与初学者以及有经验的内核开发者,如果你想加入到内核开发者行列,那么它也适合你。有经验的开发人员可以跳过那些介绍基础测试和调试的章节。
这份教程介绍如何测试和调试 Linux 内核、工具、脚本以及在回归测试会集成测试中使用的调试机制。另外,本文还会介绍如何使用 git 把针对一个 bug 的补丁分离出来,在介绍介绍把你的补丁提交到内核的邮件列表之前需要做些什么。我将会使用 Linux PM 作为测试它调试的对象。尽管本文讨论的是 Linux 内核,但是介绍的方法适用于任何其他软件开发项目。
### 配置开发与测试的系统 ###
第一步找一个满足你需求的开发环境x86-64 是一个比较理想的选择,除非你必须用特别的架构。
第二步,安装 Linux 发行版,我推荐 Ubuntu所以本教程会介绍基于 Ubuntu 的配置过程。你可以参考[如何使用 Ubuntu][2] 来安装一个 Ubuntu 系统。
在开发和测试环境,最好要保证你的 boot 分区有足够的空间来存放内核文件。你可以为 boot 分区留下 3GB 空间,或把 boot 分区直接放到根目录下,这样 boot 分区可以使用整个磁盘的空间。
安装好操作系统后,确保 root 用户可用,确保你的用户可以使用 sudo 命令。你的系统也许已经安装了 build-essential它是编译内核必备的软件包如果没安装运行下面的命令
sudo apt-get install build-essential
然后运行下面的命令,保证你的系统能够交叉编译内核。下面的 ncurses-dev 安装包是运行 make menuconfig 命令必须用到的。
sudo apt-get install binutils-multiarch
sudo apt-get install ncurses-dev
sudo apt-get install alien
然后安装一些每个内核开发者都会用到的工具包:
sudo apt-get install git
sudo apt-get install cscope
sudo apt-get install meld
sudo apt-get install gitk
如果你喜欢把内核通过交叉编译以支持非 x86_64 架构的环境,请参考[在 x86_64 上交叉编译 Linux 内核][3]。
### 稳定的内核 ###
使用 git 克隆一个稳定的内核,然后编译安装。你可以参考[Linux 内核结构][4]来找到最新的稳定版和开发主线。
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
上面的步骤将会创建一个新的目录,名为 linux-stable然后把源码下载到里面。
你也可以直接下载压缩包并解压出源码,无需使用 git
tar xvf linux-3.x.y.tar.xz
--------------------------------------------------------------------------------
via: http://www.linuxjournal.com/content/linux-kernel-testing-and-debugging?page=0,0
译者:[bazz2](https://github.com/bazz2) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://events.linuxfoundation.org/images/stories/pdf/als2012_gregkh.pdf
[2]:http://howtoubuntu.org/
[3]:http://linuxdriverproject.org/mediawiki/index.php/Cross-compiling_Linux_kernel_on_x86_64
[4]:https://www.kernel.org/

View File

@ -0,0 +1,68 @@
关于Linux命令的10个有用的面试问题及其答案
==================================================================================================================================================
Linux命令行以及用户使用Linux命令进行Linux shell交互是Linux最吸引人的地方也是面试中最普遍的话题之一。在这篇文章中我们将提出10个面试中很重要问题这肯定能拓宽你的知识面
![Linux Command Questions](http://www.tecmint.com/wp-content/uploads/2014/07/Linux-Command-Questions.png) Linux Command Questions
### 1. 如何停止一个正在运行的进程 ###
**答案**:为了停止正在运行的进程,我们可以使用组合键 Ctrl+Z
### 2. 什么是安装Linux所需的最小分区数量以及如何查看系统启动信息 ###
**答案**:单独一个/root分区足以执行所有的系统任务但是强烈建议安装Linux时需要至少三个分区/root,/boot,/swap。一个IDE硬盘驱动器支持高达63个分区SCSI硬盘驱动器支持超过15个分区
为了检查启动信息我们可以使用cat或者dmesg命令如下所示
#cat /var/log/messages
OR
#dmesg
### 3. 在你的Linux机器上更踪系统事件的守护进程名是什么###
**答案**'syslogd',它负责更踪系统信息,并将更踪日志存储在特定的日志文件里
### 4. 在/root分区运行'fsck'命令的最低要求是什么?###
**答案**/root分区必须挂载为只读模式而不是读写模式
### 5. 如何分层复制/home目录到另一个目录你有什么办法###
**答案**Linux的'cpio'命令起到了效果。'cpio'可以分层地复制文件和目录层次结构到另一个位置
### 6. 在Linux中怎样实现日志文件的自动替换###
**答案**'logrotate'提供日志自动替换功能
### 7. 你知道Linux中是谁在安排工作吗###
**答案**:使用'at'命令加上'-l'选项,就可以查出
### 8. 如何在不解压tar包的前提下查看包里的内容 ###
**答案**:使用'tar -tvf'。选项t(显示内容)v详细报告tar处理的文件信息f使用档案文件或者设备
### 9. 什么是页面错误,它是怎么发生的?###
**答案**:当一个程序请求内存中不存在的数据时,就会产生页面错误,导致的结果就是程序停止
### 10. 什么叫在程序中返回代码?###
**答案**返回代码是shell的特性。返回代码显示了程序的状态一个成功的程序执行后返回0&&可以用来决定那个应用程序先执行
好了,文章要结束了。不久以后,我还会在这分享其余有趣文章的,记得和我们保持联系。还有,别忘了在评论栏里面向我们提供您的宝贵意见
-----------------------------------------------------------------------------------------------------------------
via: http://www.tecmint.com/10-useful-interview-questions-and-answers-on-linux-commands/
原文作者:[Avishek Kumar][a]
译者:[su-kaiyao](https://github.com/su-kaiyao) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.tecmint.com/author/avishek/