由于我们习惯了使用Ctrl+S来保存数据,所以在使用SecureCrt是经常会出现僵死的情况。

实际上是Ctrl+s用来暂停向终端发送数据的,可以使用Ctrl+q来恢复。

这些设置都是基于STTY的:

Sttyset tty)用于检测和修改当前注册终端的通信参数,为键盘的输入和终端的输出提供了重要的控制手段。其中stty选项前有负号(-),表示该项被清除或禁止

参数:-a, --all:输出所有设置。

# stty -a
speed 38400 baud; rows 36; columns 134; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S;
susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts -cdtrdsr
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke

其他参数设置:

  -g, --save:输出所有设置,输出格式为另一个stty可以恢复当前设置的格式。

old_tty_settings=`stty -g`#保存初始的终端设置

stty "$old_tty_settings"#还原终端设置

stty cols 90#设置列宽为90

stty erase ^H#解决在SQLPLUSFTP时无法使用backspace

stty -echo#关闭回显,默认打开回显stty echo

 详细使用方法请见:man stty

  Have Fun!