-6

I'm trying to run a bash script named serverloadtest.sh to test a server is performing correctly. However, when I type serverloadtest.sh all I get is 'command not found'. I'm definitely typing the right script name...

1

In addition to using ./serverloadtest.sh, as DisplayName said, make sure your script is executable. If it's not, use chmod to change the permissions. For example, chmod 755 serverloadtest.sh will give you read/write/exec permissions and others read/exec permissions, or chmod u+x serverloadtest.sh will give you (the owner) exececute permissions, in addition to the permissions you already have.

1

If you are in the folder, run ./serverloadtest.sh instead.

If you are not in the folder you must cd into the folder where serverloadtest.sh is, or type out the full path.

1

Just type sh serverloadtest.sh or /usr/local/.../serverloadtest.sh or change your current directory to where this script is and type ./serverloadtest.sh

Try to read about how to run shell scripts.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.