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

3
  • 2
    Please copy/paste the commands as you use them. If you run mkdir /pionloop/ you'll get /pionloop, not ./pionloop. Commented May 24, 2020 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. Commented May 24, 2020 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. Commented May 24, 2020 at 17:30

1 Answer 1

5

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 
0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.