3 ms·
"most systems"? Not on Debian or Ubuntu, and that's most of them.
by enneff 12y ago
"most systems"? Not on Debian or Ubuntu, and that's most of them.
- smtddr 12y agofwiw, making those "-i" aliases to rm, mv and cp are one of the first things I do on any new Linux machine I'm on. I don't understand how anyone works in the very unforgiving-of-accidental-delete *nix world without those aliases.
- enneff 12y agoWith care.
- dietrichepp 12y ago99% of the time, my terminal is open to a git repo, and -i would just be more noise. The other 1% of the time I add the alias or use Nemo.
- jsnell 12y agoThe "rm -i" alias is a horrible, horrible idea. Red Hat has a lot of stupid defaults, but this is probably the most questionable one. The useless confirmations on every deletion is so intrusive that people will instinctively try to work around it. In the best case they'll undefine those crappy aliases in their own shell config, or maybe gravitate toward writing /bin/rm rather than rm to avoid the alias expansion. In the bad case they'll learn that "rm -f" will override "rm -i", and get in the habit of using that to shut rm up. Too bad that "-f" does more than negate "-i"... People who don't actively work to circumvent the braindamage will almost certainly end up reflexively teaching themselves to just answer "y" to the prompts without reading. Or worse, they'll learn to depend on the prompts being there, and doing "rm * " when their intent is not to remove everything. "Yeah, I'll just answer 'n' for the files I want to keep". That's going to be a really nasty surprise when they use a machine without that alias. No. Just no. Don't do it. The solution in zsh is much better. Warn for "rm * " (or "rm * .o", etc) no matter what, since that's both very dangerous and very rare. But don't waste the user's attention on every single deletion.
- smtddr 12y agoHmm. Well I guess it's just me then. I've been burned so many times by rm/mv/cp that I actually do always read their confirmations and give it a 2nd thought. I rarely delete files unless it's a mass delete or files & folders that I do "rm -rf". and I pretty much never intend for mv or cp to overwrite an existing file.
- semi-extrinsic 12y agozsh has a nice feature where rm is only interactive if you are deleting everything in a folder. Another safety feature I really like in zsh is to tab-expand wildcards, so I can check that it's not deleting anything it shouldn't.
- rdc12 12y agoFrequent snapshots and backups (non-local)
- Alupis 12y ago> Not on Debian or Ubuntu, and that's most of them Perhaps I should have said "sane systems" ;) Fedora ships with that alias by default FWIW.
- enneff 12y agoI don't know why anyone would use Fedora by choice.
- Alupis 12y agoFrankly put, it's a fantastic development environment -- mostly because it's targeted at developers/power-users and not the average user. It has the added benefit of being inside the "RHEL/CentOS" ecosystem (similar commands, structure, etc), provides a glimpse of what's-to-come in future releases of RHEL/CentOS, and since majority of servers in the enterprise are RHEL/CentOS based, it's a natural fit. All that aside -- have you tried Fedora 21? It's a complete overhaul from previous Fedora releases and has a lot to like and offer.
- enneff 12y agoI guess I have always had ideological issues with RedHat, as a distribution. It doesn't surprise me that they would put the -i alias in Fedora; this kind of "helpful" addition that is actually totally annoying and inappropriate is, IMO, emblematic of the distro. I'm sure it works for some but it's not for me.
- 0942v8653 12y agoor Arch Linux, or OS X, or Cygwin, or … … I don't think anyone does that.