在less命令中关闭计数行号

时间:2016-02-27 11:56:16

标签: linux opensuse less-unix

在openSUSE 12.2中,package hotelpro; public class Customer { String name; int PESEL; Room room; } public class Room { int RoomNo; boolean Occupied=false; Room(int RoomNo){ this.RoomNo=RoomNo; } } package hotelpro; public class HotelPro { /** * @param args the command line arguments */ public static void main(String[] args) { Room[] rooms=new Room[10]; for (int i=0;i<rooms.length;i++) { rooms[i]=new Room(i); } for (int i=0;i<rooms.length;i++){ System.out.println(rooms[i].RoomNo); System.out.println(rooms[i].Occupied); } } } 命令会在打开文件时计算行号。这会在处理大文件时造成很多延迟。有没有办法禁用此选项?

1 个答案:

答案 0 :(得分:3)

我的less(cygwin)有一个-n选项来禁止默认行为。相当于长版本--line-numbers。请man less查看您的less选项。