I can/t use mkdir -p ~/bin
1
0
Entering edit mode
4.5 years ago
758104598 • 0

By reading biostars handbook, I found I can't use the command mkdir -p ~/bin, or other command related to ~/bin. The answer showed: "/Users/apple/bin: Not a directory". please help

software error • 1.4k views
ADD COMMENT
0
Entering edit mode

what is the 'response' for the mkdir command ?

likely you don't have permissions (though a bit weird you won't) to create that folder .

ADD REPLY
0
Entering edit mode

Thxs for your kindly reply. when I go to the bin directory and mkdir a new directory. It said like this "appledeMacBook-Pro-3:bin apple$ mkdir -p combine mkdir: combine: Operation not permitted" it seems like I don't have the permissions.

ADD REPLY
0
Entering edit mode

It looks like you are trying to make the directory in the system bin folder.

You need to be in your home directory:

cd ~
mkdir -p ./bin
ADD REPLY
0
Entering edit mode

This error does not really make sense to me together with the command you used. Please type in exactly these commands, and then make a screenshot from the terminal:

cd ~/
ls -lh
mkdir ~/bin

Which version of macOS are you using?

ADD REPLY
2
Entering edit mode
4.5 years ago

Here's my guess (I don't have a MacOS to test). There is already a file /Users/apple/bin (a file, not a directory) so when you try to make a directory called bin in /Users/apple mkdir fails even if you have -p because you can't replace the file with a directory. I don't know why the comments suggest issues with permissions since in such case the error should be something like "permission denied".

ADD COMMENT
0
Entering edit mode

Good catch, that is why I was asking above for the ls.

touch bin
mkdir -p bin
mkdir: bin: Not a directory

Therefore @OP, do rm bin and then repeat making the directory.

ADD REPLY

Login before adding your answer.

Traffic: 3029 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6