|
|
Log in / Subscribe / Register

Linux bind mounts

Linux bind mounts

Posted Mar 19, 2025 14:24 UTC (Wed) by andrejp (guest, #47396)
In reply to: Linux bind mounts by farnz
Parent article: Fedora discusses Flatpak priorities

> You can bind-mount files as well as directories, under Linux

Really? Well that's new lol. Lemme check.

# cd /tmp
# touch sfile; mkdir sdir
# mount --bind sfile sbox
mount: /tmp/sbox: mount system call failed: Not a directory.
Hm. It does say "Not a dir". Perhaps I'm not doing it right?
# mount --bind sfile sbox/sfile
mount: sbox/sfile: mount point does not exist.
Hm. Perhaps the file must exist before?
# touch sbox/sfile
# mount --bind sfile sbox/sfile
#
Yup. Indeed.
Tnx, I just learned something new :)


to post comments

Linux bind mounts

Posted Mar 19, 2025 14:40 UTC (Wed) by andrejp (guest, #47396) [Link]

(^^ new for me, it has probably been around for a while)


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds