Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

Spaces are seperators, so it creates the following directories:

  • bin
  • lib
  • lib/NAME (NAME being a subdirectory of lib)
  • test
share|improve this answer

You must log in to answer this question.

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