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...
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.
If you are in the folder, run
If you are not in the folder you must
cd into the folder where
serverloadtest.sh is, or type out the full path.
sh serverloadtest.sh or
/usr/local/.../serverloadtest.sh or change your current directory to where this script is and type
Try to read about how to run shell scripts.