Home / Linux / Linux control sequence tricks | Network World

Linux control sequence tricks | Network World

There are quite a few control sequences available on Linux systems — many I use routinely and some I’ve only just recently discovered — and they can be surprisingly useful. In today’s post, we’re going to run through a series of them and take a look at what they do and how they might be useful.

To start, unless you’re brand spanking new to the command line, you are undoubtedly familiar with the ctrl-c sequence that is used to terminate a running command. In print, this same sequence might be expressed as ^c or control-c and sometimes the “c” will be capitalized, but the expression always means “hold the control key and press the key specified — with no shift key or hyphen involved.

You may have never tried ctrl-u. This control sequence and its “partner in crime” ctrl-y work together in an interesting way. The ctrl-u sequence removes the text you’ve just typed from command line and places it in something of a clipboard while ctrl-y puts in back. So, when you’ve just typed a complicated command, but not yet hit return and then realize that you need to run some other commands first, you can save the command you’ve typed, take care of whatever other commands you need to run and then yank the command you saved back into place.

$ gensched 07-2018 IT summary^u <== typed line will disappear
$ update cal 07-2018            <== run some other commands
$ schedCheck
$ ^y <== "gensched 07-2018 IT summary" reappears

The ctrl-s and ctrl-q sequences also have a working relationship. Where ctrl-s freezes your screen, ctrl-q allows the display to continue rolling again.


>> Source Link

Check Also

Download Vivo NEX Dual Display Edition Wallpapers

Download Vivo NEX Dual Display Edition wallpapers in 1080 x 2340 px resolution. These 15 FHD+ …

%d bloggers like this: