生产环境Linux常用命令【随时更新】

1. 查询文件中的关键字并高亮显示【查询当前目录关键字为elasticsearch的日志文件】

find ./ -name "my-elasticsearch.log" | xargs grep --color=auto "elasticsearch"

2. 查看日志文件后100行

tail -100f log_file.log

猜你喜欢

转载自www.cnblogs.com/LUA123/p/9990548.html