https://www.jianshu.com/p/49760de7b8cb
亲测有效,自己使用!
nohup java -jar talkba-app.jar --spring.profiles.active=pro --spring.data.mongodb.uri=mongodb://loofim:loofim123@129.204.56.166:27008/imdb --spring.redis.host=172.16.0.92 &
tail -f nohup.out 查看日志 grep [-acinv] [--color=auto] [-A n] [-B n] '搜寻字符串' 文件名 参数说明: -a:将二进制文档以文本方式处理 -c:显示匹配次数 -i:忽略大小写差异 -n:在行首显示行号 -A:After的意思,显示匹配字符串后n行的数据 -B:before的意思,显示匹配字符串前n行的数据 -v:显示没有匹配行-A:After的意思,显示匹配部分之后n行-B:before的意思,显示匹配部分之前n行 --color:以特定颜色高亮显示匹配关键字 grep -in "搜索关键字" nohup.out