Date: Thu, 13 Mar 1997 00:53:11 -0800 (PST) From: Doug White <dwhite@gdi.uoregon.edu> To: Dan Wolfe <dwolfe@zyga.com> Cc: "'questions@freebsd.org'" <questions@freebsd.org> Subject: Re: Creating a directory link from one partition to another Message-ID: <Pine.BSI.3.94.970313003219.1205F-100000@localhost> In-Reply-To: <01BC2F43.B1D0D9A0@dans-zyga-pc.zyga.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 13 Mar 1997, Dan Wolfe wrote: > I would like to move my /var/mail directory, which is in the / > partition, to the /usr partition. I was thinking of establishing a link > to do this. Can anyone help me the steps involved to perform this. Any > help is certainly appreciated. Unless you did otherwise, /var is usually it's own partition. (It's supposed to be, at least, so if you fill /, it can still log the error without causing bigger problems.) Permissions is the tricky part here. Someone PLEASE check my work, there is always the possibility of stupid bugs. There will be a temporary mail burp while /var/mail is deleted -- you may wish to kill sendmail or drop to single user mode while you're doing this. It goes without saying you must be root. Do the following: mkdir /usr/target/directory chmod 655 /usr/target/directory chown bin:bin /usr/target/directory tar -cpf - -C /var/mail . | tar xpf - -C /usr/target/directory The tar man page has details. THe original example didn't have the p option on the left side, I added it just in case. Ensure that /var/mail and your new directory match exactly, permissions and ownership on the files are crucial otherwise no one will be able to read the mail. After the heiarchy is copied, rm -rf /var/mail to trash the old dir, then run ln -s /usr/target/directory /var/mail to make the link. That should do it. Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.3.94.970313003219.1205F-100000>