-Bash: Chmod +X: Command Not Found. Using the Chmod +X Command on Macos Gives Error

-Bash: Chmod +X: Command Not Found. Using the Chmod +X Command on Macos Gives Error

On my MAC, I'm typing in the chmod +x command, and getting the following error -

-bash: chmod +x: command not found

What should be done here?

echo $PATH

/Applications/apache-maven-3.8.4
8

1 Answer

When you want to use terminal commands normally, your $PATH value should be something like this: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin.

If you want to keep /Applications/apache-maven-3.8.4 as $PATH for some reason , then you should use

/bin/chmod +x /Users/someone/Documents/some_file

instead of

chmod +x /Users/someone/Documents/some_file

Edit:

The error message included the +x as part of the name of the command that wasn't found

I figured out, that you can recreate the error by entering this command in the terminal: "chmod +x" test.txt --> zsh: command not found: chmod +x To fix it you should do "chmod" +x test.txt.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Robert Thorne
Author

Robert Thorne

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.