From owner-freebsd-questions@FreeBSD.ORG Sat Nov 5 20:33:12 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86740106564A for ; Sat, 5 Nov 2011 20:33:12 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from asbnvacz-mailrelay01.megapath.net (asbnvacz-mailrelay01.megapath.net [207.145.128.243]) by mx1.freebsd.org (Postfix) with ESMTP id 51E488FC0C for ; Sat, 5 Nov 2011 20:33:11 +0000 (UTC) Received: from mail8.sea5.speakeasy.net (mail8.sea5.speakeasy.net [69.17.117.53]) by asbnvacz-mailrelay01.megapath.net (Postfix) with ESMTP id 6FF34A706C5 for ; Sat, 5 Nov 2011 16:33:11 -0400 (EDT) Received: (qmail 25613 invoked from network); 5 Nov 2011 20:33:10 -0000 Received: by simscan 1.4.0 ppid: 32274, pid: 8742, t: 0.1535s scanners: clamav: 0.88.2/m:52/d:13495 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail8.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 5 Nov 2011 20:33:10 -0000 Received: from lowell-desk.lan (lowell-desk.lan [172.30.250.8]) by be-well.ilk.org (Postfix) with ESMTP id 9CDAC2E0CE; Sat, 5 Nov 2011 16:33:04 -0400 (EDT) Received: by lowell-desk.lan (Postfix, from userid 1147) id 95CA23983C; Sat, 5 Nov 2011 16:33:03 -0400 (EDT) From: Lowell Gilbert To: Michael Sierchio References: Date: Sat, 05 Nov 2011 16:33:03 -0400 In-Reply-To: (Michael Sierchio's message of "Sat, 5 Nov 2011 13:23:02 -0700") Message-ID: <44d3d6paww.fsf@lowell-desk.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Chris , freebsd-questions@freebsd.org Subject: Re: recursive copy with spaces in descendants 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, 05 Nov 2011 20:33:12 -0000 Michael Sierchio writes: > I just use tar for this. > > ( cd /path/to/src ; tar cf - . ) | ( cd /path/to/obj ; tar xf - ) I was going to launch into an explanation of shell quoting, but come to think of it, tar is how I do this too. > On Sat, Nov 5, 2011 at 12:47 PM, Chris wrote: >> I'm having difficulty copying a directory tree from my FreeBSD server to >> USB storage. The problem is that the tree contains file and folder names >> which have spaces, similar to the following: >> >> ./foo bar/some name.tar.gz >> ./foo bar/child dir/some other name.tar.gz I think: cp foo\ bar/some\ name.tar.gz some_other_path/. will work for all shells.