查看文件可以说是最常用的功能之一了,比如我们的程序出现问题,经常要检查log文件,这时候就要用到查看文件的功能了,经常用到的有以下这几个命令: cat:由第一行开始显示文件内容 tac:从最后一行还是显示内容 nl:显示行号 more:翻页显示 less:翻页显示,并且可以向前翻页 head:只看头几行 tail:只看结尾几行 Read More
posted @ 2013-09-08 20:49 geeky_jane Views(834) Comments(0) Diggs(0) Edit
Description: Less is a program similar to more, but which allows backward movement in the file as well as forward movement. Also, less does not have to read the entire input file before starting, so with large input files it starts up faster than text editors like vi. Less uses termcap (or terminfo on some systems), so it can run on a variety of terminals. There is even limited support for hardcopy terminals. (On a hardcopy terminal, lines which should be printed at the top of the screen are pre Read More
posted @ 2013-09-08 20:35 geeky_jane Views(1927) Comments(0) Diggs(0) Edit