32 ms·
You must have an alias rm='rm -i' lying around. rm doesn't prompt by default (unless you're the owner of the dir, but not its contents). mkdir demodir && t
by jrimbault 6y ago
You must have an alias rm='rm -i' lying around. rm doesn't prompt by default (unless you're the owner of the dir, but not its contents).
mkdir demodir && touch demodir/{foo,bar} && rm -r demodir
- eMSF 6y agoIIRC 'rm -r' prompts by default for read-only files as well even if you own them.
- deleted 6y ago[deleted]
- jfrunyon 6y ago... huh. No, no alias, I just misread the manpage. I could've sworn that -I was the default......
- Macha 6y agoIt's a common thing for IT departments or people making enterprise images to put in because they think it makes it safer. I feel it does more harm than good by normalising rm -f when you want to recursively delete a folder, but with CD deployments these days it's less of a deal.
- jfrunyon 6y agoYeah... no. Also definitely not the case. If I actually am remembering it correctly then it's probably from Fedora circa FC5 or Ubuntu circa 6.06. Back when I was in school and had never touched Linux other than on my own computer.
- Macha 6y agoGo do a fresh install of CentOS/RHEL (or just spin up a new docker container) and what do you see in root's bashrc? alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' I've also encountered one job which adds this to their base ubuntu image, and my current employer uses Macs which have it added to bashrc by their mdm software on initial install. So what's your justification to dismiss the idea that this is a common practice?
- matthewbauer 6y agoAliases shouldn't be run in non-interactive shells IIRC.
- jfrunyon 6y agoI wasn't dismissing the idea that it was common practice, I was dismissing the idea that the common practice applied in my case. I did not have an IT department setting anything on my system when I experienced this. Thank you for the info, though.
- mandelbrotwurst 6y ago"CD deployments" - Ha, like an "ATM machine"? At first in thought you were describing deployments on compact discs!
- ninjanomnom 6y agoCD, continuous deployment, is used to refer to the process not an individual instance like the term ATM. Simply saying "This deployment failed" doesn't convey that it's a deployment that was made through CD but "This CD failed" is also ambiguous as it doesn't indicate whether the process or the conditions particular to a deployment that caused it to fail. Using them both in combination like "CD deployment" seems perfectly valid to me to resolve both ambiguities. To be fair though they were referring to CD deployment(s), plural, which is a bit redundant and just CD would have done just as well in this case.