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