LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Making a Symbolic link to a directory on another partition (https://www.linuxquestions.org/questions/linux-newbie-8/making-a-symbolic-link-to-a-directory-on-another-partition-741407/)

anon091 07-20-2009 09:44 AM

Making a Symbolic link to a directory on another partition
 
I want to create a symbolic link inside of /data2/storage called MyPictures to my pictures folder which is actually /data1/pictures.

How do i do that?

ln -s /data1/pictures /data/storage/MyPictures

is that right? I don't want to do something wrong and lose all my pictures.

Agrouf 07-20-2009 09:52 AM

right!

monsm 07-20-2009 09:52 AM

That sounds right. You can doublecheck the man pages.

You won't delete anything with that command. It might put the symbolic link in the wrong directory, but you won't loose anything. Just be careful when you delete a symbolic link, so that you don't delete the real directory.

Mons

anon091 07-20-2009 09:58 AM

is that what happens when you delete a symbolic link, it deletes the source folder too?

nuwen52 07-20-2009 10:09 AM

ln is basically,
ln -s <source directory or file> <destination>

Basically, the same as cp.

Also. If you delete the link, it should not touch the actual directory/file or contents. And, by that, I mean if you just use a simple rm from the command line. No -rf or anything funny like that. I think what monsm meant was don't delete the actual directory by mistake.

anon091 07-20-2009 10:10 AM

Thanks everybody, I'm all set now.


All times are GMT -5. The time now is 08:06 PM.