Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux 中对 tail -f 命令应用 grep #131

Closed
Dream4ever opened this issue Jan 12, 2021 · 0 comments
Closed

Linux 中对 tail -f 命令应用 grep #131

Dream4ever opened this issue Jan 12, 2021 · 0 comments
Labels
Software About installation ande usage

Comments

@Dream4ever
Copy link
Owner

解决过程

具体命令:`tail -f /var/log/nginx/access.log | grep --line-buffered 'ebooks'

命令解析:上面的命令中,tail -f 实时输出日志文件的最新内容,然后用 grep --line-buffered 开启 grepline buffering mode,这样就可以对实时输出的内容用 grep 进行过滤了。

@Dream4ever Dream4ever added the Software About installation ande usage label Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Software About installation ande usage
Projects
None yet
Development

No branches or pull requests

1 participant