I want to make multiple directories in one go. The problem is that one of the sub directories have a name with a space in it. The directory structure i want to make is as follows.

    /level 1

I tried escaping the space but it does not seem to work. Here is my command.

mkdir -p project/{level\ 1,level2}

But this does not seem to work. and results in directory structure like.



What am I doing wrong?

  • 1
    Can you post your .bashrc, because nothing wrongs with your command.
    – favadi
    Dec 24, 2012 at 5:32
  • 2
    Those cmds works for me
    – daisy
    Dec 24, 2012 at 10:48

1 Answer 1


You could trymkdir -p project/{'level 1','level 2'}

  • 2
    This would also work: mkdir -p project/level{' 1', 2}
    – laebshade
    Dec 24, 2012 at 18:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .