Answer the question
In order to leave comments, you need to log in
Why doesn't the mkdir 1 | mkdir 1/2"?
I want to create directory 1, and put directory 2 in it.
I know that I can do it differently, but I need to understand why this method does not work.
Gives an error message:
mkdir: Failed to make directory "1/2"; No such file or directory
, but it creates directory 1.
Answer the question
In order to leave comments, you need to log in
Create a directory named 1 and, if successful, execute another command that will create subdirectory 2 in directory 1:
mkdir 1 && mkdir 1/2
And this is mkdir 1 | mkdir 1/2
not a logical operator, but pipe - a pipe for directing output to another application.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question