전체 파일을 한 화면에 표시 할 수있는 경우 stdout으로 인쇄 횟수 감소 more. -F플래그 와 유사한 방식으로 동작

하면 more그 내용이 한 화면에 표시 할 수있는 파일을 전달, 그냥 매김없이 표준 출력에 파일의 내용을 기록합니다. 파일이 한 화면에 맞지 않으면 more페이지를 매기십시오.

less작업중인 파일을 한 화면에 표시 할 수있는 경우 종료 할 수있는 옵션이 있습니다 ( -F) more. -F플래그 와 유사한 방식으로 동작 하는 에뮬레이션 기능이 있지만 이러한 옵션 중 어느 것도 less파일의 내용을 쓰지 않는 것 같습니다 내용이 한 화면에 맞으면 stdout합니다.

less파일 내용이 한 화면에 맞고 파일이 정상적으로 다른 방법으로 페이지를 매길 수 있다면 파일 내용을 stdout에 쓰 려면 어떻게 해야합니까?



답변

사용하십시오 less -FX. 보낸 사람 man less:

   -F or --quit-if-one-screen
          Causes less to automatically exit if the entire file can be dis-
          played on the first screen.

   -X or --no-init
          Disables sending the termcap initialization and deinitialization
          strings  to  the  terminal.   This is sometimes desirable if the
          deinitialization string does something unnecessary, like  clear-
          ing the screen.


답변