Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Mar 1997 09:58:10 -0600
From:      Lee Crites <adonai@jump.net>
To:        Doug White <dwhite@resnet.uoregon.edu>
Cc:        Dan Wolfe <dwolfe@zyga.com>, "'questions@freebsd.org'" <questions@freebsd.org>
Subject:   Re: Creating a directory link from one partition to another
Message-ID:  <1.5.4.32.19970313155810.006a9ce0@jump.net>

next in thread | raw e-mail | index | archive | help
Doug's instructions looked to me to be right on target.  I'm only going to
add a comment to them...

At 00:53 13-03-97 -0800, Doug White wrote:
>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

I have had some problems with this construct in the past, so I do tar copies
like this:

  cd /source/directory
  tar -cf - . | ( cd /target/directory ; tar -xvf - )

I know, I know, the -C says to change to this directory before doing the
work.  It's a beautiful thing.  And, I assume, it is valid on FreeBSD.  But,
unfortunately, it is not a *universal* thing.  Since my scripts must work on
multiple platforms, I can't use it.

>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.

Yes, this is a valuable option you should keep in mind when doing things,
especially for other users, as root.  It doesn't do any good if you move
something and as a result change the permissions so it can't be used, right?
(How many of us have been burned by that oversight?)

Lee




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