1845913 Members
4203 Online
110250 Solutions
New Discussion

link home directory

 
SOLVED
Go to solution
marvik
Regular Advisor

link home directory

Hi All,

I want to link my home directory "/home/user1" to "/var" to make some free space in /home.
I used
I did
cd /home
ln -s user1 /var
This created link file "user1 -> user1" in /var But I want
"user1 -> /var/user1" to show in /home.

Thanks
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: link home directory

Shalom,

Try:
ln -s /var user1

I get this backwards half the time I try it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
dictum9
Super Advisor

Re: link home directory

ln is like the "cp" command. Just think of "cp" and you will never get it wrong, that's what works for me.

FLQ
Valued Contributor
Solution

Re: link home directory

Hi Marvik,

1- Did you move all contents of /home/user1 in /var/user1?

2- When this is done, rm -r /home/user1

3- ln -s /var/user1 /home/user1

You will then have /home/user1 -> /var/user1

Regards

Francis
marvik
Regular Advisor

Re: link home directory

Hi All,

Francis , ur answer was to the point and it did it.
Thanks.

SEP,
ur trick created a link to /var in the home directory :)

Thanks to all for the quickness