Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Feature Request: Removal of '-F' Short Option in 'Rm' Command (lists.gnu.org)
13 points by ingve on Oct 9, 2023 | hide | past | favorite | 15 comments


What is annoying is coreutils has deprecated egrep, fgrep, and now made them print stupid messages.

  $ egrep foo /etc/motd
  egrep: warning: egrep is obsolescent; using grep -E
There's no reason why we can't keep egrep and fgrep around forever, but instead we have to change all existing scripts and programs that might use them.


You could alias egrep="grep -E" to avoid changing existing scripts. Sure, it's not ideal but it might tide you over in the meantime.


alias doesn't work in scripts. I could manually patch /usr/bin/egrep, but really why? What are we saving by getting rid of two microscopic shell scripts?


Alias at the top of your script. Sure /bin/bash doesn't read .bashrc when ran in batch mode, doesn't mean you can't patch your script.


Totally agree. Plus it adds stress to us old people who have been using egrep for years.

“Why they wanna go break all my shell scripts ?”


Or you could download the source, edit it yourself, recompile it and copy it to /usr/bin without affecting EVERY instance of Make currently deployed.


alias rm='rm -i' is going to be easier. If you're using a typical Linux distro then the root account will likely have this alias already.


> I believe that requiring users to type the full long option '--force' each time they intend to forcefully remove files or directories would serve as an effective safeguard against inadvertent deletions.

I don't. Typing "--force" will just become the new muscle memory for most, and others will just set up an alias to avoid typing it at all.


Wrong title capitalization. It's -f and rm..

Besides that, this poor guy wants to destroy the internet, LOL!


Yes, please fix this title -- I assumed we were talking about a different flag. Removing the ability to `rm -rf` (without several extra characters) would be a pain.


I very much object to this suggestion.

Removing a file is no more evil than creating one. It’s just a computer operation. I would be very irritated to have to type in full the other option.

I suggest that the requestor pay a penance by typing:

“I must be less reckless when working with computers”

1,000,000 times.

Through repetitive diligence you become a better computer user.


> I believe that requiring users to type the full long option '--force' each time they intend to forcefully remove files or directories that would serve as an effective safeguard against inadvertent deletions.

Of course software isn't a dogma and it's beautiful is that you can change it forever; but I believe somethings it's hard to sacrifice for the sake of ergonomics and/or safety.

...

Some years ago I met a person who was responsible for firearms design, mostly doing some due diligence for police forces about firearms ergonomics and safety.

In the words of this person, one of the biggest mistakes in the Brazilian army in terms of the bidding process; was the manufacturing/acquisition of a firearm called Imbel [1] that due to safety concerns a firing pin lock (PT-BR: percussor lock) and handle lock (PT-BR: lock of fist). With those 2 devices the chances of some accidental shoot drops dramatically; in some cases you can drop a loaded gan that it will not shoot.

However, with those extra safety mechanisms that prevented accidental firing, at least 2 severe compromises were made, one was that this firing pin lock had an entire mechanism that had another tree failure that was not calculated, and guess what started to have some issues; and, due to weight restrictions the pistol had half of the ammunition (from 15 to 7) and for operations that you had some intense cross-fire this firearm is not suitable.

[1] - https://www.cayanarmas.com.br/produto/armas-de-fogo/pistola/...


Every single firearm should be able to be dropped and not go off, that’s standard safety, they should only fire when the trigger is pulled.


> I believe that requiring users to type the full long option '--force' each time they intend to forcefully remove files or directories would serve as an effective safeguard against inadvertent deletions.

I'm with you. You know what will help ? A patch to bash to dissable globbing expansion. Want to recursively remove "/" ? Just type the name of every file as an argument to rm. /s


Funny :-) And a nice way to reply to choosing to break countless number of historic maintenance scripts.




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

Search: