查看進程及其pid: ps -ef
殺死進程: kill pid eg.kill 8986 是給進程發送 SIGTERM 信號,可能殺不死。
kill -9 pid 強制殺死進程
掛起當前進程,回到輸入命令界面:Ctrl + z
增加可執行權限:chmod +x xxx.sh
後臺運行:nohup (不掛起 no hang up)當某個進程需要在 xshell的後臺執行時使用,具體用法爲: nohup command &。(記住,一定要加 & ,不然你在 Xshell 執行其它命令時,該進程就會中斷)。
如果需要將信息輸入到某個文件,則爲: nohup command xxx.log 2>&1 &
查看日誌:tail -n 500 -f /usr/logs/catalina.out