Take the 2-minute tour ×
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.

project
    /level 1
    /level2

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.

project
    /level

1,level2

What am I doing wrong?

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

1 Answer

up vote 6 down vote accepted

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

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

Your Answer

 
discard

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.