在类Unix系统中,圆形符号链接有什么作用? [英] What are circular symlinks in Unix-like systems used for?
问题描述
我正在浏览Linux机器上的目录,在做详细列表时,我注意到一个链接指向自己,例如:
I was browsing a directory on a Linux machine, and when doing a detailed listing I noticed that a link is pointing to itself, for example:
somelink -> /path/to/directory/somelink
我想知道这样做的原因是什么?
I am wondering what is the reason for doing such a thing?
推荐答案
如果 somelink
位于/path/to/directory
中,则这是无效的符号链接.如果尝试访问它,文件系统将给您一个错误(可能是太多级别的符号链接 *之类的东西).创建它时可能是拼写错误(或其他错误),或者符号链接以某种方式移动并最终链接到其自身.
If the somelink
is in /path/to/directory
then this is an invalid symlink. If you try to access it, the filesystem will give you an error (probably something like too many levels of symbolic links*). It could have been a typo (or some other mistake) when it was created, or the symlink got moved somehow and ended up linking to itself.
这篇关于在类Unix系统中,圆形符号链接有什么作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!