Linux command
resize 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Resize
resize
resize -s
说明
resize prints shell commands to set the COLUMNS and LINES environment variables to the terminal's current dimensions. It communicates with the terminal emulator to determine the actual window size, then outputs commands that can be evaluated to update the environment. The command is particularly useful when the terminal window has been resized and programs need to know the new dimensions, or when working over serial connections where the terminal size may not be automatically detected.
参数
- -s _rows_ _cols_
- Set terminal size (or query if no dimensions given)
- -u
- Print Stretch shell commands for TERMCAP
- -c
- Print C shell commands for TERMCAP
- -v
- Verbose; print escape sequence used
FAQ
What is the resize command used for?
resize prints shell commands to set the COLUMNS and LINES environment variables to the terminal's current dimensions. It communicates with the terminal emulator to determine the actual window size, then outputs commands that can be evaluated to update the environment. The command is particularly useful when the terminal window has been resized and programs need to know the new dimensions, or when working over serial connections where the terminal size may not be automatically detected.
How do I run a basic resize example?
Run `resize` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -s _rows_ _cols_ do in resize?
Set terminal size (or query if no dimensions given)