0

on a linux machine running CENTOS v 7.8.2003 I am in a directory Neutrinos I now do mkdir /pionloop/ this works. I then go to into this new directory pionloop and do mkdir /E_0.3 and this works as well. I thus have as a result a directory Neutrinos/pionloop/E_0.3.

Now, starting in Neutrinos I want to do this in one command and therefore do mkdir /pionloop/E_0.3 and get: `mkdir: cannot create directory ‘/pionloop/E_3.0’: No such file or directory

What is going wrong here??

Kusalananda
  • 333,661
  • 2
    Please copy/paste the commands as you use them. If you run mkdir /pionloop/ you'll get /pionloop, not ./pionloop. – nohillside May 24 '20 at 16:42
  • 3
    Also, mkdir /E_0.3 would not create a subdirectory of /pionloop. And neither of them would be located in Neutrinos. – Kusalananda May 24 '20 at 16:44
  • You can take the first two comments as a request for clarifications. Do consider updating your question with what it is you want to do. I can imagine that you'd like to create Neutrinos/pionloop/E_0.3 in the current directory, but this is never actually stated, and you confuse matters by showing commands for creating directories in the root directory. – Kusalananda May 24 '20 at 17:30

1 Answers1

4

By default mkdir, does not create missing intermediate directories.

As mentioned in the manual (man mkdir), you can create them with the -p flag

mkdir -p pionloop/E_0.3