Live data from Hacker News

-f

c0t0d0s0.org

1–10 of 12 posts

Re: -f

#2
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.

Re: -f

#3

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.

You could use "yes | rm -r project", I guess.

Re: -f

#4

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.

[deleted]

Re: -f

#6
post #4

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.

[deleted]

[deleted]

Re: -f

#7
post #4

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.

[deleted]

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?

Re: -f

#8
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.

Re: -f

#9
post #8

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.

Did you flag the submission? If enough people do the admins might take a look and change it.

Re: -f

#10
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.
Post reply on HN