OESF Portables Forum

General Forums => Off Topic forum => Topic started by: Capn_Fish on August 14, 2007, 11:10:36 pm

Title: How To Symlink Directories?
Post by: Capn_Fish on August 14, 2007, 11:10:36 pm
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.
Title: How To Symlink Directories?
Post by: desertrat on August 15, 2007, 12:30:11 am
Quote
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.
Title: How To Symlink Directories?
Post by: Capn_Fish on August 15, 2007, 11:48:29 am
Code: [Select]
/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.
Title: How To Symlink Directories?
Post by: InSearchOf on August 15, 2007, 03:29:14 pm
I fixed your post

Late
Title: How To Symlink Directories?
Post by: Drake01 on August 15, 2007, 09:14:01 pm
Quote
Code: [Select]
/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.[div align=\"right\"][a href=\"index.php?act=findpost&pid=166268\"][{POST_SNAPBACK}][/a][/div]
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.
Title: How To Symlink Directories?
Post by: Capn_Fish on August 15, 2007, 10:40:35 pm
That solved it. Thanks everyone!