From owner-freebsd-questions@FreeBSD.ORG Tue Aug 24 05:13:33 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 530DB16A4CE for ; Tue, 24 Aug 2004 05:13:33 +0000 (GMT) Received: from gaia.nimnet.asn.au (nimbin.lnk.telstra.net [139.130.45.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id C5F1B43D39 for ; Tue, 24 Aug 2004 05:13:29 +0000 (GMT) (envelope-from smithi@nimnet.asn.au) Received: from localhost (smithi@localhost) by gaia.nimnet.asn.au (8.8.8/8.8.8R1.4) with SMTP id PAA25733; Tue, 24 Aug 2004 15:13:17 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Tue, 24 Aug 2004 15:13:17 +1000 (EST) From: Ian Smith To: "W. D." In-Reply-To: <20040823203548.85C5316A515@hub.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-questions@freebsd.org Subject: Re: Copy all files and subdirectories preserving time stamp? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2004 05:13:33 -0000 Re: freebsd-questions Digest, Vol 74, Issue 3 Message: 14 > What would be the way to copy all files and subdirectories > from one directory to another--preserving the time stamp > and other attributes? > > It seems that 'cp' usually puts a time stamp of the > current date and time. > > Would this work? > > cp -r -p -@ /some/source/directory/* /some/target/directory/ # cp -pR dir1 dir2 works for me. See the note in 'man cp' re hard linked files, though. Ian