Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Sep 2000 14:59:31 -0700
From:      Sriranga Veeraraghavan <ranga@CSUA.Berkeley.EDU>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: how to copy directory and contents? 
Message-ID:  <200009222159.OAA29115@soda.csua.Berkeley.edu>
In-Reply-To: Your message of "Thu, 21 Sep 2000 15:59:48 MDT." <20000921155948.A43806@converging.net> 

next in thread | previous in thread | raw e-mail | index | archive | help

> How do you copy a directory? I have used cp to copy files, but I am
> not sure about copying a directory and all the files within. 

I find that cpio is the prefered way to do this (several others have
mentioned tar):

$ cd <src> && find . -depth -print | cpio -pvd <dest>

----ranga


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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