其他分享
首页 > 其他分享> > head tail diff -c fff hhh 前5行 后5行 区别

head tail diff -c fff hhh 前5行 后5行 区别

作者:互联网

 

显示文件第一行:

$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
#

 

###################################

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

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

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

 ###########

hhh的第二行增加了一行空行

########

# 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.root用户进入测试项目文件夹下执行
sh run.sh [tool_name]
example: sh run.sh x11perf

 

#######

动态显示文本最新信息:

$tail -f crawler.log

标签:10,head,run,tail,sh,fff,hhh,root
来源: https://www.cnblogs.com/xuanbjut/p/11650489.html