The most common use of the -f switch for me is when deleting directories that have git repos in them. If I do "rm -r project", it complains about every single object file in the Git database being not writable. I need to "rm -rf project" to get it to actually delete the directory without having to punch "yes" a thousand times, and "man rm" doesn't offer any safer alternatives.
I understand that a local clone uses hardlinks (ln without the '-s' switch). Isn't a hardlink just a pointer to the underlying file? Removing a hardlink, even with the force switch won't delete the original version of the file in e.g. the local bare repository, or am I wrong?
Can we please use more informative titles. -f means I have to open this page to see what it's all about. Yes, that will get you views to your spamblog, but it doesn't help this site be useful, which is it's stated aim.
The title was too short for a variety of reasons (it's even a ~hard~ click target like that), but I enjoyed it.
I agree with the other reply: Complaining is probably worse than flagging it. Or - just not clicking things out of curiosity unless you genuinely want to see what 26 people at the time of this writing considered interesting.
I think the biggest reason why people abuse --force is because you have to force rm to remove directories. In our day of ~/Downloads full of extracted tarballs, we use it pretty flippantly. If that weren't the case, we might be more cautious with our --force usage.
11 comments
[ 3.0 ms ] story [ 47.2 ms ] threadThe title was too short for a variety of reasons (it's even a ~hard~ click target like that), but I enjoyed it.
I agree with the other reply: Complaining is probably worse than flagging it. Or - just not clicking things out of curiosity unless you genuinely want to see what 26 people at the time of this writing considered interesting.