Http://blog.chinaunix.net/uid-2282111-id-2113293.html
In the Linux/unix platform often use scanf from the keyboard to get characters, output characters after pressing backspace key to delete, will appear ^h, which is accustomed to the deletion by the BACKSPACE key users, feel very awkward, although you can by CTRL + Backspace key combination for delete function
The terminal configuration can be modified by the Stty command to implement the BACKSPACE removal function. As follows:
QUOTE:
[[email protected] ~]$ ID
uid=501 (Oracle) gid=501 (oinstall) groups=501 (Oinstall), 502 (DBA), 503 (asadmin)
[Email protected] ~]$ Stty erase ^h
To restore the Ctrl+backspace Combo key removal feature, execute the following command:
QUOTE:
[[email protected] ~]$ ID
uid=501 (Oracle) gid=501 (oinstall) groups=501 (Oinstall), 502 (DBA), 503 (asadmin)
[Email protected] ~]$ Stty erase ^?
All terminal settings can also be viewed via stty-a:
QUOTE:
oracle| | oralinux| | /home/oracle| | -->>id
uid=500 (Oracle) gid=501 (oinstall) groups=500 (DBA), 501 (oinstall)
oracle| | oralinux| | /home/oracle| | -->>stty-a
Speed 38400 baud; Rows 24; Columns 80; line = 0;
Intr = ^c; Quit = ^\; erase = ^h; Kill = ^u; EOF = ^d; EOL = <undef>;
Eol2 = <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
-IGNBRK-BRKINT-IGNPAR-PARMRK-INPCK-ISTRIP-INLCR-IGNCR ICRNL Ixon-ixoff
-iuclc-ixany-imaxbel
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
Linux Terminal backspace cannot delete characters