码迷,mamicode.com
首页 > 系统相关 > 详细

Linux系统中最危险的命令你试过吗?

时间:2017-03-26 22:56:03      阅读:279      评论:0      收藏:0      [点我收藏+]

标签:linux 命令

Linux 让人操心的命令

1.rm -rf *

man rm
NAME
       rm - remove files or directories
OPTIONS
       Remove (unlink) the FILE(s).

       -f, --force
              ignore nonexistent files, never prompt
 -r, -R, --recursive
              remove directories and their contents recursively
 -v, --verbose
              explain what is being done
 -i     prompt before every removal

rm -rf * 组合使用就是强制删除当前目录下所有文件。如果当前登录的是root用户,且在跟下,我只能说“哈哈”。这个还是自己以身试法过,不过实在虚拟机下失误的。没次在公司环境都是小心在小心,看了再看

2.mv * /root
NAME
       mv - move (rename) files
DESCRIPTION
       Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.

       Mandatory arguments to long options are mandatory for short options too.

       --backup[=CONTROL]
              make a backup of each existing destination file

       -b     like --backup but does not accept an argument

       -f, --force
              do not prompt before overwriting

       -i, --interactive
              prompt before overwrite
又是切身经历并且在生产环境下,
以taiga用户登录,在家目录下执行 mv * /root ,惨了!因为公司当时用这个用户装taiga项目管理工具。

Linux系统中最危险的命令你试过吗?

标签:linux 命令

原文地址:http://10972755.blog.51cto.com/10962755/1910513

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!