我喜欢如何less
使用+
命令行中的-parameter添加命令。我喜欢这样的即时搜索:
$ less +/DHCP /var/log/syslog
# result: syslog at the point of the first occurrence of DHCP
Run Code Online (Sandbox Code Playgroud)
但我也喜欢将它设置为遵循这样的输出:
$ less +F /var/log/syslog
# result: a syslog that follows the file, very much like tail -f would.
Run Code Online (Sandbox Code Playgroud)
但每隔一段时间我都喜欢两者。但我不知道该怎么做。
$ less +F +/DHCP /var/log/syslog
# result: "Pattern not found" - it will actually bunch up both things to one string.
Run Code Online (Sandbox Code Playgroud)
任何能告诉我如何自动过滤而无需在开始时按的人的奖励积分?
$ less +\&DHCP /var/log/syslog
# result: "please press enter" after which the filtering search _is_ …
Run Code Online (Sandbox Code Playgroud)