Help - Search - Members - Calendar
Full Version: How To Symlink Directories?
OESF Forums > General Forums > General Support and Discussion > Off Topic forum
Capn_Fish
How do you symlink directories? When I try to cd into a directory I've symlinked, it says "too many layers of symbolic links."

Thanks.
desertrat
QUOTE(Capn_Fish @ Aug 15 2007, 03:10 AM)
How do you symlink directories? When I try to cd into a directory I've symlinked, it says "too many layers of symbolic links."

Same as for a file. You've probably got some recursive links somewhere.
Capn_Fish
CODE
/stuff#mkdir test
/stuff#ln -s test /test
/stuff#cd /test
-bash: cd: /test: Too many levels of symbolic links
/stuff#


What am I doing wrong, then? There's nothing in the folder.
InSearchOf
I fixed your post

Late
Drake01
QUOTE(Capn_Fish @ Aug 15 2007, 10:48 AM)
CODE
/stuff#mkdir test
/stuff#ln -s test /test
/stuff#cd /test
-bash: cd: /test: Too many levels of symbolic links
/stuff#


What am I doing wrong, then? There's nothing in the folder.
*

Try using a full path. I believe ln uses relative paths, which has caused confusing problems for me before. With relative paths, you're linking /test to itself. ln -s /stuff/test /test should accomplish what it seems you're trying to do.
Capn_Fish
That solved it. Thanks everyone!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.