From: Mark Schlam <mslist () castle ! beaver ! edu>
To: tru64-unix-managers
Subject: SUMMARY: tar - an easy question
Date: Thu, 30 Jul 1998 11:49:42 +0000 [thread overview]
Message-ID: <96078715812034.tru64-unix-managers.marc@archive.invalid> (raw)
Dear Managers:
I never cease to be amazed at the speed of responses from this list.
Thanks to all!
Here are the first responses, many of which are similar,
but if you look carefully at the comments
they all provide very interesting insights.
Mark
From: Arno Hahma <arno@nitro.pp.utu.fi>
cd /usr/users/foo; tar cpf - . | (cd /newdir/usr/users/foo; tar xBvpf - )
Skip the v from the last tar, if you don't want to see, what's
happening. You can skip the B, if both directories are local.
From: "S.Barbaresi" <s.barbaresi@bangor.ac.uk>
cd /usr/users/foo
tar cf - * | ( cd /newdir/use/users/foo ; tar xvpf - )
"cd" first otherwise you will get absolute pathnames!
From: Thomas Leitner <tom@finwds01.tu-graz.ac.at>
cd /
tar cpf - usr/users/foo | (cd /newdir; tar xpvf -)
I would do it with vdump, though:
cd /usr/users
mkdir /newdir/usr/users/foo
vdump -D -0 -u -f - foo | vrestore -x -f - -D /newdir/usr/users/foo
Tom
From: milan.lesnik@uni-mb.si
cd /usr/users/foo
#
# chose device with enough free space
#
tar cvf ../something.tar .
cd /newdir/usr/users/foo
tar xvpf /usr/users/something.tar
Milan
From rb237@phy.cam.ac.uk Thu Jul 30 07:33:43 1998
Okay. Try this:
# cd /usr/users/
# tar cf - foo | (cd /newdir/usr/users; tar xvf -)
Regards,
Rich
From shirish_jani@hotmail.com Thu Jul 30 07:33:47 1998
>Hi,
I suppose u should try following from the /usr/users/foo dir
% tar cvf - . | ( cd /newdir/usr/users/foo ; tar xvf -)
this is slightly time consuming but will work.
Shirish Jani
From: "Andrew L. Weston" <andreww@adacel.com.au>
To: mslist@castle.beaver.edu
cd /usr/users/foo
tar cf - . | ( cd /newdir/usr/users/foo && tar xvpf - )
(The && ensures that the cd worked before running tar)
From rem@ams.org Thu Jul 30 07:34:05 1998
From: Robert E Morse <rem@ams.org>
Here is the syntax I would use:
cd /usr/users
tar cf - foo* | "cd /newdir/usr/users; tar -xpf -"
or if the target dir is already created,
cd /usr/users/foo
tar cf - * | "cd /newdir/usr/users/foo; tar -xpf -"
From marcink@ex-mail.crt.tpsa.pl Thu Jul 30 07:34:13 1998
From: Kasperski Marcin <marcink@ex-mail.crt.tpsa.pl>
(cd /usr/users/foo; tar cf - . ) | (cd /newdir/usr/users/foo; tar xf - )
From imrozek@pakpol.ahlstrom.com Thu Jul 30 07:34:17 1998
From: Ireneusz Mrozek <imrozek@pakpol.ahlstrom.com>
I don't know if I help you, because I suggest you use cpio. This is
solution with cpio ( you have to be in source directory):
find . -depth -print | cpio -pd newdir
^^^^^^^
destination
(solution from "Unix Power Tools" - O'REILLY)
From: Robert Kubarych <rkubaryc@sunyrockland.edu>
I think this will do the trick.
cd /newdir/usr/users
tar -cf - -C /usr/users foo | tar -xvpf -
original question:
> Can someone provide the exact tar syntax to copy an entire directory
> structure using tar from one disk drive to another under du4.0b.
>
> The directory to be copied is /usr/users/foo and everything below
> /usr/users/foo. The target is /newdir/usr/users/foo. I will summarize.
reply other threads:[~1998-07-30 11:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox