- Alias Setting for server management
alias st_sv='nohup java -jar /home/ubuntu/ODOT/target/odot-0.0.1-SNAPSHOT.jar > /home/ubuntu/ODOT/nohup.log 2>&1 &'
- If you want to set the alias, you should do as follows.
alias stop_sv='kill -9 `ps -ef | grep odot | awk '\''{print $2}'\''`'
- If you want to use it directly in the shell, you should do as follows.
kill -9 `ps -ef | grep odot | awk '{print $2}'`
-
If you want to know why those two are different, see the next article.