People should start making their shells act like in the 2000's and not 1990.
I only use raw "rm" when I need to delete a large folder that should not go in the trash bin.
In fact distros should start caring for user friendliness and even ask to do that on installation.
A system with no trash bin is what, before Windows 95?
as a regular user of rm for decades without any issue whatsoever this reads like parody.
I understand it probably isn't, and I understand the logic behind the design choices that are prevalent in a modern OS..
but some of us just want the machine to do what it's told the first time, and we're competent and confident enough with our holstered foot-guns that we're not a major threat to any system that is being administrated properly.
>In fact distros should start caring for user friendliness and even ask to do that on installation.
I felt a great disturbance in the Force, as if millions of scripts suddenly cried out in terror and were suddenly silenced. I fear something terrible has happened.
people try to coin terms and initiate trends all the time. it's no 'thats so fetch' but its not that bad. I'd never use it personally and have never heard of this type of lunacy but to each their own.
Sure, for someone riding a horse for decades, a bicycle may look like a parody but people should look for more convenient methods.
> we're competent and confident enough with our holstered foot-guns that we're not a major threat to any system that is being administrated properly.
This is more like a parody that you should realize how many people are losing data over simple wrong "rm" everyday as apparently average people aren't as competent as you're with decades of experience.
Desktop Linux also has a trash bin like anyone would expect. Not sure why this is not the case on the command line.
Yes, aliasing rm to trash-put may screw bunch of scripts but that doesn't mean people should find out about trash-cli after they've lost data. Smart scripts should not rely on aliases but use a clean environment or specify a full path to a command as well.
It could act as trash-put when used interactively or how come rm itself can't evolve over POSIX when rm is one of the easiest way to screw yourself with no confirmation by default.
The thing is that many Linux commands can wreck your system if you're not careful: a wrong `dd` or `mkfs`, removing a core package and its dependencies, a wrong change in `/boot`, etc.
I've definitely lost work because of this, but it always served as a learning experience, and I was more careful next time. I don't think I'd want to use a system with training wheels, not even when I was learning. The whole idea of Unix is giving full control to the user, and respecting them enough to allow them to make mistakes. If I didn't want that I'd be using a more restrictive OS.
BTW, a good middle ground between raw `rm` and `trash-put` is `alias rm='rm -i'`. This way you can confirm deletions or pass `-f` to force it.
Done that 15 years ago.
Ended up using -f because the confirmation got annoying fast.
Landed onto using trash-cli and never had to bother anything when rm'ing.
You can add 'trash-empty 30' in daily cron to delete files older than 30 days in the trash.
If I were to alias rm to something safer, I would probably get used to it, and over time start being less careful on the rare occasions I do use it.
Then I'd SSH into some system that didn't have the alias, and screw myself over.
rm should ideally have trashed stuff instead from the start, but since it doesn't, I think it's best to forevermore treat it as a dangerous command, unless all major distros switch.
When I'm about to delete something with wildcard expansion, I'll first `ls` the wildcard expansion and glance over the results to make sure I'm not deleting anything I don't want to delete.
Glad you've diligently followed that rule for over 10 years but think of average users.
It's also very possible that you actually want the file back later even though you thought you didn't need it then.
Deletion confirmations are more important in GUI systems like Window's file explorer, where accidentally deleting a selected file would otherwise be a single mistaken keypress away. The delete key is easy to accidentally press. Your cat could even do it for you. Using rm requires a lot more effort, so I don't find a confirmation necessary.
A cat needs to step on up arrow and enter to repeat a command as well.
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.
It saves me, usually in minor ways, a few times a year.
The real saviour is git.