symlinks for newbs ?

GlennH

Verified User
Joined
Jul 10, 2004
Messages
49
Hello,
I understand you must ssh or vnc to the server, no problem there.
I like others wish there was an easier way, but here goes...

I want

home/username/domains/domain.com/public_html/my Dir

to point to

home/username/domains/domain.com/private_html/my Dir

without having to delete private_html/myDir.

Is following correct ?

cd to
home/username/domains/domain.com/public_html/my Dir
then

ln -s home/username/domains/domain.com/private_html/my Dir


Thanks,
Glenn
 
Since it's never a good idea to put a space in a directory name in Linux, I'm taking the liberty of renaming your directory in my example:
GlennH said:
Is following correct ?

cd to
home/username/domains/domain.com/public_html/my Dir
then

ln -s home/username/domains/domain.com/private_html/my Dir
Close.

First, as root, cd to:

/home/username/domains/domain.com/public_html/

note the leading forward slash, and if you've got a myDir directory at that level remove it:

rmdir ./myDir

Then also as root:

ln -s /home/username/domains/domain.com/private_html/myDir myDir

That should do it.

Jeff
 
Back
Top