Answer the question
In order to leave comments, you need to log in
Virtual folders in Linux is it possible?
Hello!
There is a user folder (for example, Ivan). Is it possible to create a folder, the content of which will be equal to the content of another folder (/usr/local), while the folder is physical (not a windows shortcut). However, this folder can be accessed via sftp (scp) (if configured). Is this possible, and if so, how to create such a folder?!
Thanks in advance for your replies!!!
Answer the question
In order to leave comments, you need to log in
If sftp to /usr/local is not an option, from what I know I can suggest mount --bind
.
A normal, empty folder is created in the home folder: mkdir /home/ivan/usr-local
If you now do this from root
, then the contents of the first folder will be displayed in the second folder. Cancel the spell, respectively, .
By mana, instead of manual commands, you can write in
, which will lead to a similar effect automatically. mount --bind /usr/local /home/ivan/usr-local
the contents of which will be equal to the contents of another folder (/usr/local), while the folder is as a physical one (not a windows shortcut).
man ln
but if you don't like to read mana, like me, then google what comrade Ronald wrote to you
Symbolic links will suffice for your task.
are done by the ln command with the -s
man ln option
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question