
한 화면에 내용을 표시할 수 있는 파일을 전달 하면 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.