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 have been trying to figure this out tried different commands and still have gotten no where. Can you please help me with this question?

In your home directory, create a subdirectory called shirts. Within the subdirectory, create 108 files with file names of the form style.size.color.ext, where each file contains one combination of values from the following table.

Style   tee, crew, turtleneck
Size    XXL, XL, L, M, S, XS
Color   red, yellow, blue
Extension   info, inv

This is the last command I used.

$ touch shirts/{tee,crew,turtleneck}.{XXL,XL,L,M,S,XS}.{red,yellow,blue}/{info,inv}
share|improve this question
Did you already mkdir shirts? –  glenn jackman Jun 14 '14 at 15:42

2 Answers 2

up vote 9 down vote accepted

There is a slight error in your touch command. Your original command,

touch shirts/{tee,crew,turtleneck}.{XXL,XL,L,M,S,XS}.{red,yellow,blue}/{info,inv}

In the end there is a / which again tries to create a directory and since the directory doesn't exist you will get an error as,

touch: cannot touch `/shirts/turtleneck.XS.blue/inv': No such file or directory

However, since you need only files, you need to change your original command as,

touch shirts/{tee,crew,turtleneck}.{XXL,XL,L,M,S,XS}.{red,yellow,blue}.{info,inv}

P.S: You need to make sure that the directory shirts already exists. Otherwise, you will again get the same error cannot touch.

share|improve this answer
Thank you so much, the first time I attemped the command I did it correctly with the . instead of the / at the end. I did not do mkdir shirts. Its always something basic I over look. I am a new student thank you again. –  user72510 Jun 14 '14 at 16:24
You are welcome. If this resolves the issue, please accept the answer so that the question is resolved :) –  Ramesh Jun 14 '14 at 16:27
its is spelt it's: it is a contraction of it is. Where as its is a word used to announce the thing that belongs to it. e.g its hat (the hat that belongs to it). –  richard Jul 15 '14 at 22:44

According to your description, the name of each of these 108 files should follow the format style.size.color.ext.

So it should be

mkdir shirts
touch {tee,crew,turtleneck}.{XXL,XL,L,M,S,XS}.{red,yellow,blue}.{info,inv}

What touch is doing is creating an empty file, but you are trying to create a directory shirts with different subdirectories. touch can't do that.

Edit: You can also make the touch cmd above shorter / look better:

touch {tee,crew,turtleneck}.{{X,XX,}L,M,{X,}S}.{red,yellow,blue}.{info,inv}
share|improve this answer

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.