![전체 파일을 한 화면에 표시할 수 있는 경우 표준 출력으로 인쇄되는 양을 줄이십시오.](https://linux55.com/image/32127/%EC%A0%84%EC%B2%B4%20%ED%8C%8C%EC%9D%BC%EC%9D%84%20%ED%95%9C%20%ED%99%94%EB%A9%B4%EC%97%90%20%ED%91%9C%EC%8B%9C%ED%95%A0%20%EC%88%98%20%EC%9E%88%EB%8A%94%20%EA%B2%BD%EC%9A%B0%20%ED%91%9C%EC%A4%80%20%EC%B6%9C%EB%A0%A5%EC%9C%BC%EB%A1%9C%20%EC%9D%B8%EC%87%84%EB%90%98%EB%8A%94%20%EC%96%91%EC%9D%84%20%EC%A4%84%EC%9D%B4%EC%8B%AD%EC%8B%9C%EC%98%A4..png)
한 화면에 내용을 표시할 수 있는 파일을 전달 하면 more
페이징 없이 단순히 파일 내용을 표준 출력에 씁니다. 파일이 한 화면에 맞지 않으면 more
페이징됩니다.
less
처리 중인 파일을 화면( )에 표시할 수 있는 경우 종료 옵션이 있고 플래그와 유사한 방식으로 동작하는 시뮬레이션 기능이 -F
있지만 이러한 옵션 중 어느 것도 파일 내용을 손상시키지 않는 것 같습니다. 내용이 한 화면에 들어갈 수 있으면 작성되고 표준 출력으로 출력됩니다.more
-F
less
less
파일 내용이 한 화면에 맞고 평소처럼 파일의 페이지를 매길 수 있다면 어떻게 파일 내용을 표준 출력에 쓸 수 있습니까?
답변1
사용 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.