Linux学习|Gentoo/Arch/FreeBSDLinuxLinux学习之路

less 查看多个文件翻页

2019-11-28  本文已影响0人  王诗翔

在 Linux 有时候批量处理结果必不可少,可能会面对要查看多个结果的时候。最常见的查看命令是 less,我猜测应该有这个功能。我打开多个文件后尝试用 p 和 n 翻页死活不行。。。

一查,原来前面要加冒号!

      :n     Examine  the next file (from the list of files given in the com‐
              mand line).  If a number N is specified, the N-th next  file  is
              examined.
       :p     Examine the previous file in the command line list.  If a number
              N is specified, the N-th previous file is examined.

最下方会显示所处第几个文件:

参考:

https://superuser.com/questions/347760/less-command-with-multiple-files-how-to-navigate-to-next-previous

上一篇 下一篇

猜你喜欢

热点阅读