Creating multiple directories simultaneously

Charlie Kester corky1951 at comcast.net
Fri Mar 26 17:19:16 UTC 2010


On Fri 26 Mar 2010 at 10:01:21 PDT Jerry wrote:
>On Fri, 26 Mar 2010 09:28:15 -0700, Charlie Kester
><corky1951 at comcast.net> articulated:
>
>> For extra credit, and to test your understanding, see if you can
>> explain how the following work:
>>
>> $ mkdir -p FOO/{foo-,bar-}{1,2,3}
>>
>> $ cp foo{,.bak}
>
>Maybe I am doing this wrong; however, I had to use the "-R" flag with
>'cp' to make it work. I also assume you meant "FOO" and not "foo"
>unless I am completely misunderstanding this exercise.

Sorry, pedagogical error.  I didn't intend that to operate on the
results of any of the other examples. I probably should have chosen
something other than 'foo' in order to avoid that misunderstanding.

The point was simply to explore what happens when one of the terms
inside the braces is an empty string.


More information about the freebsd-questions mailing list