In Linux system, we usually use ln -s
to make the symbol link for folder. But today, I have a strange requirement: I want to make a symbol link of folder A under folder A.
If we use cd
command to go into folder A, such as an INFINITE LOOP, we can keep entering the new A folder all the time.
In fact, this is a horrible thing! Don't do this!
But in the process of establishing I encountered the following problem:
Too many levels of symbols links
After inquiring, this problem was caused by the fact that when I created the symbol link, it was created under the folder that I used, which caused the link to lose its reference position. Therefore, as long as the "absolute path" is used when establishing a symbol link, there is no problem.
ln -s /home/ccs96307/A A/A
In this way, you can create your own symbol link under the folder.
References
- https://www.ieor.iitb.ac.in/files/faculty/amahajan/howtos/too_many_levels.html
- https://unix.stackexchange.com/questions/141436/too-many-levels-of-symbolic-links
- https://www.unix.com/unix-for-dummies-questions-and-answers/11324-too-many-levels-symbolic-links.html
- https://superuser.com/questions/1053196/too-many-levels-of-symbolic-links