顯示文件第一行: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