Live data from Hacker News

Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user

github.com

131–140 of 280 posts

Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user

#131
post #126
post #120

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.

With care.

Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user

#132

Earlier 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.

Steam doesn't deal with its own files. It deals mainly with random games that are creating tons of random files.

Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user

#133
post #126
post #120

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.

99% 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.

Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user

#134
post #98
post #91

Earlier 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…

So you're telling us that accidental death is okay as long as it isn't in the millions? How did you decide on that number? Where is the line drawn?

Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user

#135

To 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…

Yes, that person is still an unprofessional idiot.

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

#136
post #120
post #113

Earlier 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.

> 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

#137
post #120
post #113

Earlier 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.

or Arch Linux, or OS X, or Cygwin, or …

… I don't think anyone does that.

Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user

#138

Earlier 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.

So what, your definition of a solved problem is one that never occurs again due to uniform implementation of countermeasures? That isn't realistic. That is like saying that plane geometry isn't a solved problem because people are still walking around having not read Euclid's "Elements", doing geometry wrong.

Re: Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user

#140
post #126
post #120

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.

The "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.

Post reply on HN