I create a symbolic link for a directory, What links are the files in the directory and subdirectories? hard link or symbolic link?
3 Answers
If you created a symbolic link to a directory, then the files and directories beneath that directory are not modified, linked, or copied in any way.
If you access the contents of the directory via the symbolic link, you will access the real files and subdirectories beneath, albeit via a path that contains a symbolic link component.
You can't create hardlinks for directories (in a way you can, but you should not). This will only work for regular files. As for the content of a directory you've created a symbolic link to, it will stay the same, as it's just another reference to the target folder.
You will be linking to that directory and this has nothing to do with the contained files or directories. In Linux, everything is a file so you are creating a link to that file (directory in your case). How that file is connected with other files is irrelevant.