less 查看多个文件翻页

在 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

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容