From owner-freebsd-questions@FreeBSD.ORG Sat Nov 5 20:19:17 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 D1336106564A for ; Sat, 5 Nov 2011 20:19:17 +0000 (UTC) (envelope-from cpuburner@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 640CD8FC08 for ; Sat, 5 Nov 2011 20:19:17 +0000 (UTC) Received: by faar19 with SMTP id r19so5625374faa.13 for ; Sat, 05 Nov 2011 13:19:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=h7ukDbGoR6/zNy4/hha0L80swBJS0fT+s2g4yXeM5OU=; b=MvHaaGpj65EwM3AKj9GDAPpQ+oAE6drXWKkp3u5KiGf6k+Ta6qtVeYy38IqyaxPz1H qsTHpYsziS3xMtC8xVTN5bU0/mPckKsq7Lkj+UQLj7oYkZWTfAEgWYeSHgDCPofuk0ee bFp1i01ynSDKZe6++f8Up91vIRWqo5CahQLwM= Received: by 10.223.76.66 with SMTP id b2mr34806531fak.15.1320522461072; Sat, 05 Nov 2011 12:47:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.96.200 with HTTP; Sat, 5 Nov 2011 12:47:20 -0700 (PDT) From: Chris Date: Sat, 5 Nov 2011 15:47:20 -0400 Message-ID: To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: 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:19:17 -0000 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 to 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 names 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.