Live data from Hacker News

Ooops.

github.com

21–30 of 247 posts

Re: Ooops.

#21

I use the safe-rm ( http://freshmeat.net/projects/safe-rm ) package to help me avoid doing this kind of thing.

Do you not find that a lack of wide installation limits its usefulness?

I just use it for my boxes. It doesn't stop me putting something silly in a make file (as in the example here), but it does stop me getting burnt by it.

Re: Ooops.

#23
post #20

just tried to explain this to a few of my windows using coworkers.

"Tried?" Certainly it wasn't that hard to explain.

Windows users that aren't privy to *nix culture generally don't find all of the "rm -rf ..." jokes all that funny. They get it, but it's sort of like telling a german joke in English to an English speaker only; they get it, but it looses it's humor if you aren't privy to the culture.

Re: Ooops.

#24

While we're on the subject, has anyone successfully found/created a replacement for rm on OS X that moves files to the trash, but doesn't break the interface of rm for use in scripts?

Normal Unix method of doing this is via LD_PRELOAD, then you wrap unlink() in something that moves things to a folder. I used something - think it was libtrash - when I used Linux on the desktop, but haven't investigated what the OS X equivalent would be.

Re: Ooops.

#27

just tried to explain this to a few of my windows using coworkers.

Just tell them it's the same as a Windows installer accidentally removing the entire Program Files directory.

Pool of Radiance had a bug where the uninstaller would wipe your hard drive. Oops.

http://arstechnica.com/reviews/01q4/pool_of_radiance/pool-1....

Re: Ooops.

#29

While we're on the subject, has anyone successfully found/created a replacement for rm on OS X that moves files to the trash, but doesn't break the interface of rm for use in scripts?

rmtrash http://www.nightproductions.net/cli.htm I prefer 'brew install rmtrash'

There's lots of stuff like that out there, I'm talking about something I can actually replace the rm binary with, a wrapper that precisely maintains the rm interface as described here: http://developer.apple.com/library/mac/#documentation/Darwin...

I like the idea of actually wrapping the unlink syscall, but I have no idea if/how darwin allows that.

Re: Ooops.

#30

just tried to explain this to a few of my windows using coworkers.

Just tell them it's the same as a Windows installer accidentally removing the entire Program Files directory.

and the entire windows directory, and the entire users directory, and ...
Post reply on HN