#查看test文件前5行内容
head -5 test
#查看test文件后5行内容
tail -5 test
#ping一个网址,将信息写到文件中
ping www.baidu.com > test_log
#查看文件
cat test_log
#动态的查看文件
tail -f test_log
#查看test文件前5行内容
head -5 test
#查看test文件后5行内容
tail -5 test
#ping一个网址,将信息写到文件中
ping www.baidu.com > test_log
#查看文件
cat test_log
#动态的查看文件
tail -f test_log