Author Topic: How To Symlink Directories?  (Read 4680 times)

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
How To Symlink Directories?
« 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.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

desertrat

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
    • http://
How To Symlink Directories?
« Reply #1 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.
« Last Edit: August 15, 2007, 12:35:38 am by desertrat »
SL-C3100 / Ambicon WL1100C-CF / pdaXrom 1.1.0beta3 / IceWM

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
How To Symlink Directories?
« Reply #2 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.
« Last Edit: August 15, 2007, 03:29:04 pm by InSearchOf »
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

InSearchOf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1144
    • View Profile
    • http://
How To Symlink Directories?
« Reply #3 on: August 15, 2007, 03:29:14 pm »
I fixed your post

Late
Sharp Zaurus SL-C3100 and SL-6000L
pdaXrom Developer
Please visit pdaXrom.org for updates
My Blog
IRC #pdaxrom @ FreeNode

Drake01

  • Full Member
  • ***
  • Posts: 226
    • View Profile
How To Symlink Directories?
« Reply #4 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.
Device: SL-C3200 running pdaXii13v2 build 5.5.0
Networking: Symbol Spectrum24 WLAN card; Kingston CIO10T CF NIC
Storage: 4GB Transcend 150x SD; 16GB Transcend 133x CF; 4GB Seagate CF HDD; 4GB Patriot SD
HID: Logitech V450 Laser Mouse; generic silicone USB keyboard; 2 generic optical mice; stock plastic stylus
GPS: generic "UT-41" USB GPS Receiver
Case: neoprene case from my old Palm foldable keyboard

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
How To Symlink Directories?
« Reply #5 on: August 15, 2007, 10:40:35 pm »
That solved it. Thanks everyone!
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo