From owner-freebsd-questions@FreeBSD.ORG Mon Aug 23 21:21:53 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 ECBA316A4CF for ; Mon, 23 Aug 2004 21:21:53 +0000 (GMT) Received: from usw2.natel.net (2b.bz [209.152.117.190]) by mx1.FreeBSD.org (Postfix) with SMTP id 19D6943D46 for ; Mon, 23 Aug 2004 21:21:53 +0000 (GMT) (envelope-from WD@US-Webmasters.com) Received: (qmail 95954 invoked from network); 23 Aug 2004 21:21:50 -0000 Received: from batv-01-027.dialup.netins.net (HELO xyz.US-Webmasters.com) (216.248.109.28) by us-webmasters.com with SMTP; 23 Aug 2004 21:21:50 -0000 Message-Id: <5.1.0.14.2.20040823161545.0730a950@209.152.117.178> X-Sender: wd@209.152.117.178 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Mon, 23 Aug 2004 16:20:56 -0500 To: freebsd-questions@freebsd.org From: "W. D." In-Reply-To: <412A2293.9090808@flncs.com> References: <5.1.0.14.2.20040823115109.04717ec0@209.152.117.178> <5.1.0.14.2.20040823115109.04717ec0@209.152.117.178> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable cc: Moti Levy 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: Mon, 23 Aug 2004 21:21:54 -0000 At 12:00 8/23/2004, Moti Levy wrote: >W. D. wrote: > >>Hi folks, >> >>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=20 >>current date and time. >> >>Would this work? >> >>cp -r -p -@ /some/source/directory/* /some/target/directory/ >> >> >try using tar , >cd /some/source/directory/ > >tar cfP - *|(cd /some/target/directory/ ; tar xfP - ) Thanks, Moti! I tried this but got an error: tar: You may not specify more than one '-Acdtrux' option So, I googled for: http://www.Google.com/search?q=3Dtar+copy+directories+attributes and found a neat LinuxMafia page. I sucessfully tried this: rsync -av /some/source/directory/ /some/target/directory/ Start Here to Find It Fast!=99 ->= http://www.US-Webmasters.com/best-start-page/ $8.77 Domain Names -> http://domains.us-webmasters.com/