3 ms·
rm has mollyguarding, that's why every invocation of rm you see on the internet is followed by -f
by denkmoon 7mo ago
rm has mollyguarding, that's why every invocation of rm you see on the internet is followed by -f
- yjftsjthsd-h 7mo agoI think that may be a combination of (IMHO unfortunate) factors: * Yes, on some systems rm is aliased to rm -i by default. * Some scripts will use rm -f because normal rm returns an error if the target already doesn't exist but -f doesn't care. * Finally, sometimes files are just ... I think it's being marked read-only that does it? I've hit this while trying to rm a git checkout; you actually do need to add -f sometimes to succeed. So if you just add -f then it'll always work.