PDA

View Full Version : creating a symbolic link from 'Movies' folder to another folder?




cb911
Jun 19, 2004, 09:10 AM
hi,

i'm just trying to make a symlink from the Movies folder (~/Movies) to my own 'movies' folder on a different partition (Volumes/Doc_o/MyMovies).

i'm trying to find out how to do this... i tried
ln -s /Users/mugget/Movies /Volumes/Doc_o/MyMovies
and it seemed to have done it, but i can't see any difference when i try and open either folder?

i want the Movies folder to open the MyMovies folder when i click it from the sidebar in Finder, and also the same thing to happen for the Documents folder...

if anyone knows how to do this, i'd really appreciate the help. :) thanks.



robbieduncan
Jun 19, 2004, 09:17 AM
Do an ls -l on /Users/mugget

A link has an l in the permissions. Note that you cannot normally create a link that has the same name as an existing file of folder: you need to remove the existing file first.

szark
Jun 19, 2004, 09:55 AM
This:
ln -s /Users/mugget/Movies /Volumes/Doc_o/MyMovieswill cause both links to open the /Users/mugget/Movies folder.

You need to:

rm the existing /Volumes/Doc_o/MyMovies link
create /Volumes/Doc_o/MyMovies as an actual folder with the same permissions as /Users/mugget/Movies
transfer all of your files from /Users/mugget/Movies to your new folder
Trash the /Users/mugget/Movies folder (and empty trash)
use the following command to make a new link:

ln -s /Volumes/Doc_o/MyMovies /Users/mugget/Movies
That should provide the functionality you want.

EDIT: On second thought, I guess it would be much easier to simply:

rm the existing /Volumes/Doc_o/MyMovies link
move /Users/mugget/Movies to /Volumes/Doc_o/MyMovies
use the following command to make a new link:

ln -s /Volumes/Doc_o/MyMovies /Users/mugget/Movies

cb911
Jun 19, 2004, 06:26 PM
thanks szark. :)

i just tried
ln -s /Volumes/Doc_o/MyMovies /Users/mugget/Movies
and it looks like it just created an alias in the Movies folder, but it did work to take me to the MyMovies folder.

but i didn't follow your instructions exactly to the letter...

i did 1. rm the existing /Volumes/Doc_o/MyMovies link

but i wasn't sure about 2. move /Users/mugget/Movies to /Volumes/Doc_o/MyMovies
do you mean move the Movies folder inside the MyMovies folder? or replace the MyMovies folder with the Movies folder?

thanks for you help on this. :)

szark
Jun 19, 2004, 11:25 PM
do you mean move the Movies folder inside the MyMovies folder? or replace the MyMovies folder with the Movies folder?

Replace the MyMovies folder with the Movies folder.

Basically, you want to have your files in the MyMovies folder, and have /Users/mugget/Movies be a link to that folder, instead of being an actual folder.