Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Nov 2011 15:47:20 -0400
From:      Chris <cpuburner@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   recursive copy with spaces in descendants
Message-ID:  <CAKFHi=_W_sC-agEEpq%2Bco9MvvqBt1Ee3W8VEtL-sKwkYa-7yAg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKFHi=_W_sC-agEEpq%2Bco9MvvqBt1Ee3W8VEtL-sKwkYa-7yAg>