答案1
這可以使用以下方法完成stty
變更和列印終端線路設定的程序。
假設我想為bash
以docker run -it ...
or開始的會話docker attach ...
和bash
以 開始的會話獲得相同的終端大小bash exec -it
。
首先 II 應取得第一個終端的目前終端大小:
bash-4.2# stty size
68 317
I 應該為第二個終端設定相同的值:
bash-4.2# stty size # check current terminal size before (it's not required)
0 0
bash-4.2# stty rows 68
bash-4.2# stty cols 317