Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Symbolic link question

Symbolic link question
Thread Tools
gbhgbh
Dedicated MacNNer
Join Date: Jan 2002
Location: Washington DC
Status: Offline
Reply With Quote
Jan 6, 2005, 10:35 PM
 
I'm trying to store the cache for an application (Unison newsreader) on an external drive rather than keep it in my home directory by using a symbolic link. However I get an error message when I enter the ln -s command. Here are the steps I took.
1. Drag the cache folder to the external drive
2. Delete the original directory
3. Open Terminal App and cd to the external drive
4. Enter the command "ln -s ./Unison/ ~/Library/Cache/Unison/"

However I get this error message
ln: /Users/gbh/Library/Caches/Unison/: No such file or directory

And if I recreate the directory in the path above, I get this error
ln: /Users/gbh/Library/Caches/Unison//: File exists

How can I get this to work?
     
Rainy Day
Grizzled Veteran
Join Date: Nov 2001
Location: Oregon
Status: Offline
Reply With Quote
Jan 7, 2005, 04:33 AM
 
Using mount may be more appropriate for what you want to do here, particularly with the -o union option. See also man fstab
     
Mithras
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
Jan 7, 2005, 10:47 AM
 
Originally posted by gbhgbh:
4. Enter the command "ln -s ./Unison/ ~/Library/Cache/Unison/"

How can I get this to work?
1. Use the full path in both instances.
ln -s /Volumes/ExternalDrive/Unison ~/Library/Caches/Unison

2. Note the lack of the terminal / on the target path.
     
Dog Like Nature
Dedicated MacNNer
Join Date: May 2004
Status: Offline
Reply With Quote
Jan 7, 2005, 11:36 AM
 
Sounds like the destination for your link doesn't exist.
As Rainy Day says, if the external partition is used solely for your cache, mounting it at the appropriate place in your filesystem would be an elegant option.

Also it's a good idea to specify the source as a full pathname. Using $PWD instead of . can help here.
╭1.5GHz G4 15" PB, 2.0GB RAM, 128MB VRAM, 100GB 7200rpm HD, AEBS, BT kbd
╰2.0GHz T2500 20" iMac, 1.5GB RAM, 128MB VRAM, 250GB 7200rpm HD

http://www.DogLikeNature.com/
     
gbhgbh  (op)
Dedicated MacNNer
Join Date: Jan 2002
Location: Washington DC
Status: Offline
Reply With Quote
Jan 7, 2005, 08:12 PM
 
I got it to work. It was the "/" at the end of the target path that was causing the problem.
Thanks for the help.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 09:09 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,