lsof查看文件描述符的offset
2016-04-20 11:07
330 查看
1.基本概念
lsof -s :显示进程打开的文件的当前大小
lsof -o :显示进程打开的文件的offset
注意:The -o and -s options are mutually exclusive; they can't both be specified,也就是 -s、-o不能同时使用
2.查看进程打开的文件大小
lsof -p $pid -s | grep "access.log"
3.查看进程打开的文件offset
lsof -p $pid -o | grep "access.log"
第二个图的数字比较大,是因为文件一直在被写入
0x:16进制显示
0t:10进制显示
End;
lsof -s :显示进程打开的文件的当前大小
lsof -o :显示进程打开的文件的offset
注意:The -o and -s options are mutually exclusive; they can't both be specified,也就是 -s、-o不能同时使用
2.查看进程打开的文件大小
lsof -p $pid -s | grep "access.log"
3.查看进程打开的文件offset
lsof -p $pid -o | grep "access.log"
第二个图的数字比较大,是因为文件一直在被写入
0x:16进制显示
0t:10进制显示
End;
相关文章推荐
- Linux socket 初步
- Linux Kernel 4.0 RC5 发布!
- linux lsof详解
- linux 文件权限
- Linux 执行数学运算
- 10 篇对初学者和专家都有用的 Linux 命令教程
- Linux 与 Windows 对UNICODE 的处理方式
- Ubuntu12.04下QQ完美走起啊!走起啊!有木有啊!
- 解決Linux下Android开发真机调试设备不被识别问题
- 运维入门
- 运维提升
- Linux 自检和 SystemTap
- Ubuntu Linux使用体验
- c语言实现hashmap(转载)
- Linux 信号signal处理机制
- linux下mysql添加用户
- Scientific Linux 5.5 图形安装教程