Earlier quoted context omitted.
"most systems"? Not on Debian or Ubuntu, and that's most of them.
fwiw, 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.
Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user
131–140 of 280 posts
Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user
#132Earlier quoted context omitted.
Would this have stopped things getting deleted? if [ -z "$STEAMROOT" ] # something isnt right...
Not if the previous line was: STEAMROOT=$SOME_OTHER_UNSET_VARIABLE/ "rm -r " is a code smell, as much as "cc -o myprog .c" is. You should always know what files make up your system, and track them in a MANIFEST file. There's rarely a good reason to use wildcards when a program is dealing with its own files. xargs rm -df -- fixes this.
Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user
#133Earlier quoted context omitted.
"most systems"? Not on Debian or Ubuntu, and that's most of them.
fwiw, 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.
Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user
#134Earlier quoted context omitted.
There are several problems with your ideas. The most important one is that programmers only call themselves engineers until it comes time to take legal responsibility for their work; then suddenly they're artists creating works for hire. Programmers have worked very hard through the years to create the current liability-free environment; people die because of health care programming bugs, pilots crash because of avio…
> Programmers have worked very hard through the years to create the current liability-free environment; people die because of health care programming bugs, pilots crash because of avionics bugs, and people lose fortunes -- or welfare checks -- because of finance programming errors, but programmers just throw up their hands, and say that programming is hard. Yeah, we've all noticed the rampant mass deaths of millions…
Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user
#135To those name-calling the author of the script: The product/update is hyped and the release date is set in stone. Tensions are high and your boss has already let you know that you're on thin ice and not delivering on the project goals. A last-minute showstopper bug comes in, caused by file leaks. Everyone is scrambling, and the file belongs to you so its on you to fix it alone. There is no time for code review, and d…
If a doctor accidentally removes the wrong organ because administrators have overscheduled him, "whoopsie, not my fault" is not the appropriate answer. The same applies to engineers working on bridges. Professionals take responsibility for their working conditions.
There is an enormous shortage of programmers right now. Anybody shipping stuff that is bad or dangerous is choosing that. If we drop our professional standards the moment a boss makes a sadface, then we're not professionals.
Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user
#136Earlier quoted context omitted.
most systems have "alias rm='rm -i'" by default, so it would prompt on every single file regardless of ownership, etc.
"most systems"? 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.
Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user
#137Earlier quoted context omitted.
most systems have "alias rm='rm -i'" by default, so it would prompt on every single file regardless of ownership, etc.
"most systems"? Not on Debian or Ubuntu, and that's most of them.
… I don't think anyone does that.
Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user
#138Earlier quoted context omitted.
You are describing a problem that has been solved several times over. Blame steam, the distro devs, or the user for not implementing one of the many long existing solutions: chroot [0]. [0] http://en.wikipedia.org/wiki/Chroot
If a problem has been solved several times over, that's a sign that it has never really been solved. If there's a thing that most apps should do, then doing it should be the default, and avoiding the default should be the thing that takes work.
Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user
#139If you're curious about who the "Scary!" guy is, someone pointed to where the code was checked in: https://github.com/lrusak/steam_latest/commit/21cc14158c171f...
Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user
#140Earlier quoted context omitted.
"most systems"? Not on Debian or Ubuntu, and that's most of them.
fwiw, 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.
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.