查看进程及其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