当more传递一个其内容可以在一个屏幕上显示的文件时,它只是将文件的内容写入标准输出而不进行分页。如果文件不能在一个屏幕上显示,则对其进行more分页。
less如果正在处理的文件可以显示在一个屏幕 ( -F) 上,则有一个退出选项,并且它具有more-emulation 功能,其行为方式与该-F标志类似,但这些选项似乎都不会导致less写入文件的内容如果内容可以在一个屏幕上显示,则为 stdout。
less如果文件的内容可以在一个屏幕上显示并像通常那样对文件进行分页,我怎样才能将文件的内容写入标准输出?
Chr*_*own 18
使用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.
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3069 次 |
| 最近记录: |