-
Notifications
You must be signed in to change notification settings - Fork 6
Linux 中对 tail -f 命令应用 grep #131
Copy link
Copy link
Closed
Labels
SoftwareAbout installation ande usageAbout installation ande usage
Description
解决过程
- 搜索关键词:
tail and grep - 参考资料:How to 'grep' a continuous stream?
具体命令:`tail -f /var/log/nginx/access.log | grep --line-buffered 'ebooks'
命令解析:上面的命令中,tail -f 实时输出日志文件的最新内容,然后用 grep --line-buffered 开启 grep 的 line buffering mode,这样就可以对实时输出的内容用 grep 进行过滤了。
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
SoftwareAbout installation ande usageAbout installation ande usage