Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Dec 2006 15:23:52 -0500
From:      Jerry McAllister <jerrymc@msu.edu>
To:        Philip Hallstrom <freebsd@philip.pjkh.com>
Cc:        freebsd-questions@freebsd.org, Lisa Casey <lisa@jellico.com>
Subject:   Re: Moving /var/mail
Message-ID:  <20061201202352.GD11235@gizmo.acns.msu.edu>
In-Reply-To: <20061201141929.G77687@bravo.pjkh.com>
References:  <001a01c7157d$cb9feee0$d5b9bfcf@lisac> <20061201141929.G77687@bravo.pjkh.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Dec 01, 2006 at 02:22:01PM -0600, Philip Hallstrom wrote:

> >I want to move /var/mail to /usr/var/mail, then symlink /var/mail to 
> >/usr/var/mail to free up space on my (too small on this machine) /var. Of 
> >course, I wish to maintain file permissions, ownerships, etc. I decided to 
> >try a dry run using a user home directory first to make sure this would 
> >work right. Good thing I did...
> 
> I'm a little confused... if you want to move /var/mail to /usr/var/mail 
> why are you messing around with /home at all?

That is just her test case, not the real one she wants to do
after she is comfortable with the process.

////jerry

> 
> This is what I would do...
> 
> ... stop your smtp program
> ... stop your pop/imap program
> tar zcvpf /tmp/varmail.tpgz /var/mail
> mkdir -p /usr/var
> mv /var/mail /usr/var/mail
> ln -s /usr/var/mail /var/mail
> ... restart your smtp/pop/imap programs...
> 
> 
> 
> 
> 
> >
> >I created /usr/kellyw  and attempted to copy the contents of  
> >/home/kellyw/ to it. First of all, I tried tar cvpf /usr/kellyw/kellyw.tar 
> >/home/kellyw/
> >
> >When I unpack the tar file, I wind up with /usr/kellyw/home/kellyw/*  Not 
> >what I wanted. I wanted all of the files in /home/kellyw/ to wind up in 
> >/usr/kellyw/
> >
> >So I then tried to just copy the files using cp -p but I can't get the 
> >syntax right on that:
> >
> ># cd /home/kellyw
> ># ls -l
> >total 16
> >-rw-r--r--  1 kellyw  kellyw  767 Aug 18 14:52 .cshrc
> >-rw-r--r--  1 kellyw  kellyw  248 Aug 18 14:52 .login
> >-rw-r--r--  1 kellyw  kellyw  158 Aug 18 14:52 .login_conf
> >-rw-------  1 kellyw  kellyw  373 Aug 18 14:52 .mail_aliases
> >-rw-r--r--  1 kellyw  kellyw  331 Aug 18 14:52 .mailrc
> >-rw-r--r--  1 kellyw  kellyw  797 Aug 18 14:52 .profile
> >-rw-------  1 kellyw  kellyw  276 Aug 18 14:52 .rhosts
> >-rw-r--r--  1 kellyw  kellyw  975 Aug 18 14:52 .shrc
> ># cp -p /home/kellyw/* /usr/kellyw/*
> >cp: No match.
> ># cp -p /home/kellyw/ /usr/kellyw/
> >cp: /home/kellyw/ is a directory (not copied).
> ># cp -p /home/kellyw/*.* /usr/kellyw/*.*
> >cp: No match.
> >
> >Can someone help me out with my syntax? The tar method would probably be 
> >better (I guess) though I don't really care  which method I use as long as 
> >it works (and preserves permissions, etc.). There are only about 60 
> >mailboxes on this system.
> >
> >Thanks,
> >
> >Lisa Casey
> >
> >_______________________________________________
> >freebsd-questions@freebsd.org mailing list
> >http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> >To unsubscribe, send any mail to 
> >"freebsd-questions-unsubscribe@freebsd.org"
> >
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061201202352.GD11235>