|
|
|
|
|
by rpigab
159 days ago
|
|
It'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. |
|
(I would write something like "Refusing to delete the entire filesystem (did a shell variable expansion go wrong?)".)