Jump to content

I have an error about sh

Go to solution Solved by Mr_KoKa,

Since you are typing it into terminal anyway then just split it into two commands and do

cd /home/minecraft\ server/desktop/test\ server/lobby
java -jar xms1730m -xmx785m spigot.jar

Notice that there is \ before every space, you could do this insted:

cd "/home/minecraft server/desktop/test server/lobby"

so the command know that the space isn't argument separator but still file name.

 

To explain what it does: it changes current working directory to where the spigot.jar is and then uses java to run the jar.

 

You can put it into file and save it as eg. run_server.sh give it rights to run by chmod +x ./run_server.sh and run it every time you need to start server again by typing ./run_server.sh when you are in same directory as the script. You may want to acknowledge with screen utility, since running server in your ssh and then terminating session may terminate server as well.

 

And easy on google translate! At least put any effort to read what it produce at the other end.

 

hello you all

 

I have an error about sh
error has failed to execute child process CD (No such file or directory)
does anyone know a losing?
I prodeer this code geprodeert but does not work!

gnome-terminal -e cd / home / minecraft server / desktop / test server / lobby && java -jar xms1730m -xmx785m spigot.jar

Link to comment
https://linustechtips.com/topic/627507-i-have-an-error-about-sh/
Share on other sites

Link to post
Share on other sites

Since you are typing it into terminal anyway then just split it into two commands and do

cd /home/minecraft\ server/desktop/test\ server/lobby
java -jar xms1730m -xmx785m spigot.jar

Notice that there is \ before every space, you could do this insted:

cd "/home/minecraft server/desktop/test server/lobby"

so the command know that the space isn't argument separator but still file name.

 

To explain what it does: it changes current working directory to where the spigot.jar is and then uses java to run the jar.

 

You can put it into file and save it as eg. run_server.sh give it rights to run by chmod +x ./run_server.sh and run it every time you need to start server again by typing ./run_server.sh when you are in same directory as the script. You may want to acknowledge with screen utility, since running server in your ssh and then terminating session may terminate server as well.

 

And easy on google translate! At least put any effort to read what it produce at the other end.

 

Link to comment
https://linustechtips.com/topic/627507-i-have-an-error-about-sh/#findComment-8095199
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×