Help me on moving /var folder

principino1984

Verified User
Joined
Oct 10, 2008
Messages
36
Hi guys,

I have to move my /var directory in /home/var

It this procedure right?

cp -a /var /home/

mount –bind /home/var /var

rm -r -f /var


and then I have to edit my fstab adding this:

/home/var /var none bind 0 0



Is this the right procedure to move /var folder without having to reboot my system?

Thanks
Marco
 
mv /var /home/var

or

cp -rfp /var /home/var
rm -rf /var
ln -s /home/var /var

Then remove entry from /etc/fstab
 
I don't have anything now on fstab

The /Var folder is in my root. I thought to write down a line in my fstab...but what I get is that with the ln command I don't need to set anything in fstab..right?
 
Back
Top