小编ame*_*hes的帖子

如何从命令行将多个“+”命令添加到less中

我所知道和经常使用的

我喜欢如何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)

command-line less

5
推荐指数
1
解决办法
241
查看次数

标签 统计

command-line ×1

less ×1