From owner-freebsd-questions@FreeBSD.ORG Sat Mar 25 23:43:42 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 49A8216A401 for ; Sat, 25 Mar 2006 23:43:42 +0000 (UTC) (envelope-from mj001@rogers.com) Received: from smtp109.rog.mail.re2.yahoo.com (smtp109.rog.mail.re2.yahoo.com [68.142.225.207]) by mx1.FreeBSD.org (Postfix) with SMTP id 8AE8643D53 for ; Sat, 25 Mar 2006 23:43:41 +0000 (GMT) (envelope-from mj001@rogers.com) Received: (qmail 49216 invoked from network); 25 Mar 2006 23:43:40 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=rogers.com; h=Received:Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date:Message-Id:Mime-Version:X-Mailer:Content-Transfer-Encoding; b=hbVwkN2K/4BqR4lr4AzkxtOgcglbeLWW52+iAU54mApV5TVR2i8ncefDidI3w0qB+pWYaBEHv1Jh3HhQTkl1eS/9pb3EkobOgaDnIc5XUvwnSZ3KiJ1oCkDaPCiQQ4KTYZ5CYgvU5XvkrLonBL1qsmW4Di2hvAaRiAaV6rd/ipA= ; Received: from unknown (HELO chaucer.jeays.ca) (mj001@rogers.com@72.139.51.96 with plain) by smtp109.rog.mail.re2.yahoo.com with SMTP; 25 Mar 2006 23:43:40 -0000 From: Mike Jeays To: Jonathan Horne In-Reply-To: References: Content-Type: text/plain Date: Sat, 25 Mar 2006 18:41:02 -0500 Message-Id: <1143330062.805.27.camel@chaucer.jeays.ca> Mime-Version: 1.0 X-Mailer: Evolution 2.4.2.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: best way to use cp? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Mar 2006 23:43:42 -0000 On Fri, 2006-03-24 at 12:38 -0600, Jonathan Horne wrote: > ok, tell them dumb linux user how to properly copy directories recursivly, > so he can stop overwritng directories with source files. > > /humor > > ok seriously, tho, i think im doing it wrong. last night i blasted some > directories, and when i looked at the destination of where i was supposed to > be copying to, it was full of all kinds of junk that was supposed to be in > the top level of the directories i was copying. > > example, i want to copy /mnt/usb1/path/oldfolder (the folded all its > recursive contents) into /home/mydir > > im pretty sure i have the syntax wrong, so could someone enlighten me? > > thanks! > jonathan > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" cp -Rp /mnt/usb1/path/oldfolder/ /home/mydir/ Note the trailing slash on the source directory. For more information, see "man cp". -R says to copy recursively down through directories, and -p says to preserve permissions, dates and times etc. -- Mike Jeays http://ca.geocities.com/mike.jeays@rogers.com