Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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?

share|improve this question
Can you post your .bashrc, because nothing wrongs with your command. – favadi Dec 24 '12 at 5:32
Those cmds works for me – warl0ck Dec 24 '12 at 10:48

1 Answer 1

up vote 6 down vote accepted

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

share|improve this answer
This would also work: mkdir -p project/level{' 1', 2} – laebshade Dec 24 '12 at 18:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.