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项目管理工具。

ide

相关文章
相关标签/搜索