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