4 ms·
Fedora has the following aliases in the root .bashrc. alias rm='rm -i' alias cp='cp -i' alias mv='mv -i'
by canistel 9mo ago
Fedora has the following aliases in the root .bashrc.
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
- rpigab 9mo agoIt's a nice addition for certain use cases, however in the case of running "rm -rf ...", it has no effect because of the "-f / --force" flag set afterwards. "rm -if" never prompts, "rm -fi" prompts. --preserve-root is an entirely different thing which will stop the command from deleting files even if you told it to. $ sudo rm -ri / rm: it is dangerous to operate recursively on '/' rm: use --no-preserve-root to override this failsafe When in doubt, you might want to activate xtrace with "set -x", run the command and see what it expanded to. then "set +x" to disable.
- zahlman 9mo ago"It is dangerous to operate recursively on '/'" is such a stereotypically traditional Linux way to explain the situation. (I would write something like "Refusing to delete the entire filesystem (did a shell variable expansion go wrong?)".)