Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am working on a Ruby tutorial and it is having set up projects using the listed command.

It is not quite clear to me what they are exactly doing with that command.

Are they making a path bin/lib/lib/NAME/test? The '/' is throwing me off maybe thinking that they are really just creating one lib folder?

thanks in advance

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

As my physics teacher used to say, "It's not as simple as it looks… it's simpler than that."

Command arguments – in both Linux and Windows – are space-delimited, and mkdir processes each one separately. So when you run mkdir bin lib lib/NAME test, it creates directories named after each argument, separately.

It is basically equivalent to:

mkdir bin
mkdir lib
mkdir lib/NAME
mkdir test

The syntax will be the same on Windows too, whether you create all four directories in one command or four commands – only the path separator differs (Windows uses lib\NAME).

share|improve this answer
add comment

Spaces are seperators, so it creates the following directories:

  • bin
  • lib
  • lib/NAME (NAME being a subdirectory of lib)
  • test
share|improve this answer
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.