DEV Community

Discussion on: Deleting Git Repo. Blocked by SymLinks

Collapse
daemoen profile image
Marc Mercer

surprised you didn't suggest -exec rm -rf {} \; as an addon to the find....

Though, in the case of unusual issues, I tend to prefer going a bit deeper than most people, why not use the inode reference and delete it specifically by inode, though in this particular case, that should be drastically overkill.

rm -rf ./.git should be sufficient.

Collapse
moopet profile image
Ben Sinclair

I didn't suggest that because I don't see how it'd be any better than the original attempt - we've already established that rm -rf doesn't work if the directory contains some kind of self-reference. I'm not sure why the find came out with that output though, because it looks like it's reporting a lot of things that shouldn't be links.
I don't really know though, I'm just guessing.