bindfs icon indicating copy to clipboard operation
bindfs copied to clipboard

--non-recursive

Open sshilovsky opened this issue 3 years ago • 3 comments

As of now, bindfs behaves like --rbind. It would be useful to be able to opt-out from this behavior.

Ideally, it should've probably been the default, but it's not possible to change it without breaking compatibility, or is it? There are options like -o bind and -o rbind, which might be of use here, although I'm not sure how, if at all possible.

sshilovsky avatar Jun 22 '22 18:06 sshilovsky

Bindfs could fairly easily be made to show directories that have a submount on them as empty, but if we want bindfs to show what's "underneath" a submount, then I don't know of a userspace API for that.

I guess bindfs could mount --bind to some internal place and view that instead of the original, but that would require root, and I think I'd rather avoid the complexity and error-proneness that would bring. I think this requirement is rare, and the user can do this manually too.

I'm curious, could you tell me more about your use-case?

mpartel avatar Jun 23 '22 04:06 mpartel

I want it just to avoid occasional rm -rf to dive into another filesystem (been there)

With the possible behavior you're describing, --non-recursive makes less sense, maybe it's better to call the option --one-file-system, like with rm.

sshilovsky avatar Jun 23 '22 09:06 sshilovsky