On Mac OSX 10.5, it cannot find my terminal commands sudo, find, etc.

I don't know what happened, but in my terminal on Mac OSX 10.5 it can no longer find my sudo command or find the command, etc. They are, because if I put / usr / bin / sudo or / usr / bin / find it works fine ...

My .bash_login file looks like this: export PATH = "/ usr / local / bin: / usr / local / sbin: / usr / local / mysql / bin: / usr / bin $ PATH"

My .bash_profile looks like this: export PATH = "/Library/Frameworks/Python.framework/Versions/Current/bin:/Library/Python/2.5/site-packages/django_trunk/django/bin:/usr/local/mysql/ bin: / usr / bin / Court $ PATH "

I will say now, I do not know what I am doing with the Terminal. I'm just a beginner, and I have to do something for the environment variables (is that what they are called?) To be lost. I suggested that I just need to make sure / usr / bin / path is in my bash files, but they are there and it doesn't seem to work. Please, help!

Also, when I use the / usr / bin / find command, it tells me "Permission denied", although I am registered with Mac OSX as a system administrator account. I do not understand.

Any help would be great. Thanks - James

+3
source share
3 answers

It appears that both of your PATH exports are garbled:

export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin$PATH"

The final bit will not work there. It should be:

export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:$PATH

"$ PATH"? ;)

, .

, . , - .

:

$ echo $PATH

, . , :

$ env
+8

.

, , .

export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/b‌​in

, . (, ls. , ). . , . , ,

cd ~

.bash_profile nano/vim ( nano )

nano .bash_profile

nano. :

export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:$PATH

'control' + 'o' (WriteOut) 'control' + 'x' nano.

! .

+3

Source: https://habr.com/ru/post/1704616/


All Articles