Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Mar 2010 13:01:21 -0400
From:      Jerry <freebsd.user@seibercom.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: Creating multiple directories simultaneously
Message-ID:  <20100326130121.61267cd4@scorpio.seibercom.net>
In-Reply-To: <20100326162815.GD84718@comcast.net>
References:  <20100326071248.4ec4ea5e@scorpio.seibercom.net> <20100326113258.GA9957@catflap.slightlystrange.org> <20100326074456.7139c3da@scorpio.seibercom.net> <20100326154907.GC84718@comcast.net> <20100326162815.GD84718@comcast.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 26 Mar 2010 09:28:15 -0700, Charlie Kester
<corky1951@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.

cp -R FOO{,.bak}
FOO -> FOO.bak/FOO
FOO/foo-1 -> FOO.bak/FOO/foo-1
FOO/foo-2 -> FOO.bak/FOO/foo-2
FOO/foo-3 -> FOO.bak/FOO/foo-3
FOO/bar-1 -> FOO.bak/FOO/bar-1
FOO/bar-2 -> FOO.bak/FOO/bar-2
FOO/bar-3 -> FOO.bak/FOO/bar-3

-- 
Jerry
FreeBSD.user@seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__________________________________________________________________

Please remain calm, it's no use both of
us being hysterical at the same time.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100326130121.61267cd4>