PDA

View Full Version : [ubuntu] How do I create a sym link to a folder?



gatorbrit
January 6th, 2011, 05:00 PM
I have 2 hard disks. Disk 1 has my home folder on it, disk two has my data and dropbox folder.

I'd like to create a symbolic link in the home folder to the dropbox folder. I was trying this:

ln /media/Secondharddisk/Dropbox /home/myname/Dropbox

But not having much luck. Any suggestions?

seawolf167
January 6th, 2011, 05:06 PM
Add a -s switch


ln -s /media/Secondharddisk/Dropbox /home/myname/Dropbox

sisco311
January 6th, 2011, 05:08 PM
By default, ln tries to create a hard link. You have to specify that you want a symlink.

ln -s -T /media/Secondharddisk/Dropbox /home/myname/Dropbox

gatorbrit
January 6th, 2011, 05:24 PM
Thanks! That did it.

sisco311
January 7th, 2011, 03:04 AM
Thanks! That did it.

Cool!

Please mark this thread as [SOLVED].

At the top of the page, click the "Thread Tools" menu, then "Mark this thread as Solved".

Thanks.