*BSD News Article 75254


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!spool.mu.edu!news.sgi.com!swrinde!cs.utexas.edu!news.sprintlink.net!news-stk-200.sprintlink.net!news.sprintlink.net!news-chi-13.sprintlink.net!news.nkn.net!news
From: syntax <syntax@eramp.net>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Best way to copy directory trees
Date: Thu, 01 Aug 1996 23:04:43 -0500
Organization: National Knowledge Network
Lines: 28
Message-ID: <32017E5B.41C67EA6@eramp.net>
References: <ts-0108961559090001@mac.infodirekt.de>
NNTP-Posting-Host: dialup25.eramp.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.0b5a (X11; I; FreeBSD 2.1.0-RELEASE i386)
CC: ts@infodirekt.de

Thomas Schreiber wrote:
> 
> I have installed a second drive on my FreeBSD 2.1 machine
> and want to move a few file systems around now.
> 
> What is the best way to copy directory trees with preserving
> access dates, permissions, links and so on?
> 
> I know about
> 
>   cp -pr
>   tar cf - | (cd destdir; tar xf -)
> 
> but both seem to not exactly preserve directory trees.
> 
> Thomas
> 
> ____________________________________________________________
> infodirekt - Thomas Schreiber         Tel:  +49 89/324796-50
> Frankfurter Ring 193a                 Fax:  +49 89/324796-51
> 80807 Muenchen, Germany              email: ts@infodirekt.de
> ________________________ See you at http://www.infodirekt.de


Take a look at the cpio command. It should make your tree into
one big file and then re-exspand it where you want it.

syntax@eramp.net