From owner-freebsd-questions@FreeBSD.ORG Sat Nov 5 20:23:04 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 53EAA106566B for ; Sat, 5 Nov 2011 20:23:04 +0000 (UTC) (envelope-from kudzu@tenebras.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id DEF738FC0A for ; Sat, 5 Nov 2011 20:23:03 +0000 (UTC) Received: by wyg36 with SMTP id 36so4595007wyg.13 for ; Sat, 05 Nov 2011 13:23:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.181.13.165 with SMTP id ez5mr3703765wid.51.1320524582798; Sat, 05 Nov 2011 13:23:02 -0700 (PDT) Received: by 10.180.81.193 with HTTP; Sat, 5 Nov 2011 13:23:02 -0700 (PDT) In-Reply-To: References: Date: Sat, 5 Nov 2011 13:23:02 -0700 Message-ID: From: Michael Sierchio To: Chris Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: 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:23:04 -0000 I just use tar for this. ( cd /path/to/src ; tar cf - . ) | ( cd /path/to/obj ; tar xf - ) - M 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've tried various combinations of cp with enclosing the top level > directory in quotations, along with other commands like tar or xargs =A0t= o no > avail. The problem seems to be with creating the destination directories > and folders, where mkdir/cp terminates with an invalid argument response. > > Cleaning up the source filenames using something like detox isn't viable, > as the files are being served by transmission-daemon, and as such the nam= es > must be preserved. Permissions are not an issue either, as the same > responses occur whether I use a standard or root account. > > Any ideas would be greatly appreciated, since I'm pretty much out of them > at this point. > _______________________________________________ > 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" >