Creating multiple directories simultaneously

Nuno Marques nmarques at di.fc.ul.pt
Fri Mar 26 11:25:06 UTC 2010


On Fri, 26 Mar 2010 07:12:48 -0400, Jerry wrote:

> I could have sworn that I saw a method of creating several directories,
> actually a parent direct and several sub-directories simultaneously;
> however, I cannot fine the documentation any longer.
> 
> Assume I want to create a directory: FOO with three directories under
> it, foo-1, foo-2 and foo-3. I tried: mkdir -p foo {foo-1, foo-2, foo-3}
> and several other variants and they all failed. I could easily write a
> simple script to accomplish it; however, I thought I could do it
> directly from the command line.

try  mkdir -p foo{,-1,-2,-3}



More information about the freebsd-questions mailing list