Hacker News new | past | comments | ask | show | jobs | submit login

Honestly I can't say I have. I usually keep removals and other hazardous commands out of my shell history by prepending them with a space character. And, if the command is coming out of my shell history, probably the file is already gone anyway (I also never use rm with relative paths, it just seems like a bad idea. Entering the full path is part of my confirmation process.)

But supposing all the stars aligned against me and my cat re-ran a removal from my shell history that actually referred to a file that existed still, I think that's a significantly less likely scenario than accidentally pressing delete in a GUI file explorer. Selecting files in a file explorer is a very common operation. And something is selected, the confirmations are the only thing standing between you and a single keypress disaster.

You know what commands scares me more than rm? cp and mv. Both of those can overwrite files, effectively deleting them. When I use rm at least my mind is already on the topic of file removal. (And yes, I know about -i, but who has time for that... I tried using aliases with -i once and disabled it the first time it inconvenienced me. Besides, I don't want to rely on a crutch that might not be there when I really need it.)

I've mostly moved away from all of this anyway, and primarily use dired and ranger.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: