Scenes
M has a few large log file, the records are sorted inside time. Now we need to find one, do not know what an error message in the position. At this time, trying to beat out the contents are struggling, even if the copy came out, general editor is also difficult to hold live such a big file. At this time, with less, it can be very simple solution to this problem.
use
The first is to open the file: less fileName.log
ctrl + f, watching the time, turn to the next page.
If you feel under partial information, you can skip the log files of the last line: shift + g
Then, ctrl + b to a page view Previous
If you know you can also search for keywords, press '/' After you enter the word you want to search, it will put all of the keywords highlighted. Find it very convenient.
To a list
1.全屏导航
ctrl + F - 向下移动一屏
ctrl + B - 向上移动一屏
ctrl + D - 向前移动半屏
ctrl + U - 向后移动半屏
2.单行导航
j - 向前移动一行
k - 向后移动一行
3.其它导航
G - 移动到最后一行
g - 移动到第一行
q - 退出 less 命令
参考:
https://cfyme.iteye.com/blog/2205978
less 常用法
Welcome to supplement and correct me