1
crystom 2020 年 7 月 7 日
vi 编辑之后,文件的 inode 变了
|
2
crystom 2020 年 7 月 7 日
ls -i access.log 可以验证试试
|
3
handsomeroger OP 我到家试试
|
4
handsomeroger OP @crystom vim 以后 inode 确实变了,看来 nginx 写入日志是指定 inode 写入的?
|
5
xuanbg 2020 年 7 月 8 日
测试日志用 vi 改 access.log ?楼主脑洞真大。。。。。。我这就只会想到 curl http://localhost/xxx
|
6
crystom 2020 年 7 月 8 日
@handsomeroger 这就是基础知识问题了,正常 C-unix 程序都是打开文件再写入,那就是根据 inode 写入的吧
|
7
handsomeroger OP @xuanbg 我需要摘取日志里的特殊字段做分析,访问测试 nginx 没法生成这个字段,都是 "-" 只能手动造。
|
8
defunct9 2020 年 7 月 8 日
echo "xxxx" >> access.log
|
9
julyclyde 2020 年 7 月 8 日
很经典的错误
|