News for hackers. Stuff that matters.
Re:-f by LeafStorm on Tuesday September 20, 2011 @10:38AM (#3017701)
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 by muxxa on Tuesday September 20, 2011 @11:04AM (#3017811)
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 by windsurfer on Tuesday September 20, 2011 @11:33AM (#3017944)
Yes, you can safely delete hardlinks.
Re:-f by footle on Tuesday September 20, 2011 @10:43AM (#3017718)
You could use "yes | rm -r project", I guess.