head tail diff -c fff hhh 前5行 后5行 区别 动态显示文本最新信息: $tail -f crawler.log

 

显示文件第一行:python

$head -1 filename

显示文件倒数第五行:工具

$tail -5 filename

]# tail -5 test.py
option=sys.argv[1]
main(option)测试

 

[root@localhost graphics-20180208]# head -5 test.py
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import os
import sys
import string
#日志

 

###################################utf-8

# cat kkk
1、工具说明:
1.root用户进入测试项目文件夹下执行
sh run.sh [tool_name]
example: sh run.sh x11perf
sh run.sh all
2.测试日志和结果目录
测试状态文件:./state.txt
测试结果目录:./results
测试日志路径:./logstring

[root@localhost yixuan-1010]# cat hhh
1、工具说明:io

1.root用户进入测试项目文件夹下执行
sh run.sh [tool_name]
example: sh run.sh x11perf
sh run.sh all
2.测试日志和结果目录
测试状态文件:./state.txt
测试结果目录:./results
测试日志路径:./logclass

 ###########test

hhh的第二行增长了一行空行import

########

# diff -c fff hhh
*** fff 2019-10-10 20:38:38.449893337 +0800
--- hhh 2019-10-10 20:40:52.448595622 +0800
***************
*** 1,4 ****
--- 1,5 ----
1、工具说明:
+
1.root用户进入测试项目文件夹下执行
sh run.sh [tool_name]
example: sh run.sh x11perf

 

#######

动态显示文本最新信息:

$tail -f crawler.log
相关文章
相关标签/搜索