From owner-freebsd-questions@FreeBSD.ORG Sat Mar 25 18:43:55 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 C368116A420 for ; Sat, 25 Mar 2006 18:43:55 +0000 (UTC) (envelope-from infofarmer@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 517A943D46 for ; Sat, 25 Mar 2006 18:43:55 +0000 (GMT) (envelope-from infofarmer@gmail.com) Received: by zproxy.gmail.com with SMTP id o1so1103212nzf for ; Sat, 25 Mar 2006 10:43:51 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=n9bT+kLzdwp/FyhiblYdbnwvZOci+EReqP2JSHOgPu8lHO+Xq5nv3lQcm7c98VpNxSE3OK2QTHFD3B1QqMbCoKmP63XT00gv/+GHU5FdAEI40p6TbqsRFb0AW5nAFG8mwFOGT30RWLKQ+a36sN16d/M/XD1KqK6s6Dtc45E9DSk= Received: by 10.36.252.39 with SMTP id z39mr2839764nzh; Sat, 25 Mar 2006 10:43:51 -0800 (PST) Received: by 10.37.22.74 with HTTP; Sat, 25 Mar 2006 10:43:51 -0800 (PST) Message-ID: Date: Sat, 25 Mar 2006 21:43:51 +0300 From: "Andrew Pantyukhin" To: "Jonathan Horne" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: 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 18:43:55 -0000 On 3/24/06, 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 i= n > 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.o= rg" > >From cp(1): "-R If source_file designates a directory, cp copies the directory and the entire subtree connected at that point. If the source_file ends in a /, the contents of the directory are copied rather than the directory itself. This option also causes symbolic links to be copied, rather than indirected through, and for cp to create spe- cial files rather than copying them as normal files. Created directories have the same mode as the corresponding source direc- tory, unmodified by the process' umask." Read the rest of the story in the manpage.