tail -f /var/log/maillog之前我在Centos 6上使用
当tail -f /var/log/maillog在CentOS 7中尝试时,它说:
cannot open \xe2\x80\x98/var/log/maillog\xe2\x80\x99 for reading: No such file or directory\ntail: no files remaining\nRun Code Online (Sandbox Code Playgroud)\n\n那么如何在 CentOS 7 中进行tail 邮件日志呢?
如果您检查的权限/var/log/maillog
ls -l /var/log/maillog
Run Code Online (Sandbox Code Playgroud)
你会看见
-rw-------. 1 root root 5844 Apr 26 20:58 /var/log/maillog
Run Code Online (Sandbox Code Playgroud)
在 CentOS 7 中,你必须属于 sudoers 并执行以下操作
sudo tail -f /var/log/maillog
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
26234 次 |
| 最近记录: |