Solve the problem that the mac system mkdir command is not available

When creating a folder, there may be illegal characters in the command, which made my entire mkdir command unusable. The prompt:
mkdir:11:command not found
was finally solved after my various attempts, so I will record it here.

1. Select shell->new command
insert image description here

In the dialog box that pops up, enter

mkdir disabled_shell_files

insert image description here

He will create a disabled_shell_files folder in your home directory

cd ~

You can switch to your home directory with the above command
insert image description here

Open a terminal, create a new command, and enter:

mv .profile .bash_history .bash_profile .bashrc .inputrc disabled_shell_files

insert image description here

If the deletion is not successful, you can try to delete this folder directly using the rm -rf command, and then try the mkdir command, and you will find that it can be used.

Guess you like

Origin blog.csdn.net/zhiyikeji/article/details/130506707