bindfs
bindfs copied to clipboard
--non-recursive
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.
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?
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.