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