Score:0

Mount a Direcoty pointing to another directory

in flag

Is there any solution if I need to mount the directory e.g. /Test pointing to /Opt/Test

Thanks Sumit

guiverc avatar
cn flag
You've provided no OS/release details; but you can have a partition (*even remote share*) mounted more than once... eg. I like my network shares mounted off / to reduce my typing, but *snap* packages cannot access them, thus I also have another copy available in `/mnt` so my browser(s) can access them (`firefox` & `chromium` are *snap* packages on my Ubuntu product).
hr flag
There are *bind mounts*, but do you may find that a symbolic link is more appropriate - see for example [What is the difference between ln -s and mount --bind?](https://askubuntu.com/questions/557733/what-is-the-difference-between-ln-s-and-mount-bind)
Wayne Vosberg avatar
bd flag
would a symbolic link do? `ln -s /Test /Opt/Test`
Score:0
cn flag

Yes, for sure there is!

Easiest option: remove "Test" and replace it by a symbolic link with the same name that links to "/Opt/Test". For practical purposes, such symbolic link behaves and acts as if it were a true directory.

More thorough option: if you have special requirements where a link does not cut it, then you can mount --bind the directory "Test" to "/Opt/Test".

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.