开头 #!/bin/bash 实时执行命令 while :; do clear; ls -lh; sleep 1; done 中间为执行命令,后端是间隔时间 实时脚本 如下,批量启动脚本命令 for j in *; do nohup java -jar $j --spring.profiles.active=test > $j.log 2>&1 & done 打印pid 如果是使用nohup可以如下: nohup java -jar Vertx001-1.0.0-SNAPSHOT-fat.jar & echo $! > run.pid
windows系统: 查端口占用并杀掉进程: netstat -ano | findstr '6379' taskkill /pid /F '123123' Linux 系统: Mac 系统: 修改host文件 subl /private/etc/hosts 修改Mac地址 sudo ifconfig en0 ether xxx