Assuming you're using bash, the overwrite mode is disabled and not bound to any shortcut by default:
Toggle overwrite mode. With an explicit positive numeric argument,
switches to overwrite mode. With an explicit non-positive numeric
argument, switches to insert mode. This command affects only emacs
mode; vi mode does overwrite differently. Each call to readline()
starts in insert mode.
In overwrite mode, characters bound to self-insert replace the text
at point rather than pushing the text to the right. Characters bound
to backward-delete-char replace the character before point with a
space.
By default, this command is unbound.
You can add a keybinding and enable it, then disable it again once you're done, but I suppose the best thing to would be to use delete-char instead, bound to Ctrld by default:
Delete the character at point. [...]
Once your cursor is on the 8, press Ctrld to delete it, and then type in the 7.
In vi mode, when already on the 8: <Esc>r7. Or the whole thing can be done using <Esc>F8r7 (starting at the end of the line) to move the cursor to the first 8 and then replacing it with 7.
7andDeleteat the same time, it doesn't matter in which order the computer registers and executes these two steps."... because this is how text editing works in almost any piece of software."Is it? I mostly use Windows, and I believe in every text editor I can select what I want to delete as a whole and then just delete it. However, I don't see that feature in the Linux terminal.bashorzshor other), and also indicate whether you first executed the wrong command or not (which means it would end up in the shell's command history, which some shells can recall and make substitutions in before executing the command again). The terminal has very little to do with this nor the fact that you are using CentOS.Ctrl-Wdeletes one word backwards.Ctrl-Udeletes from the current position to begin-of-line.