We all know that most of the Linux operations are done through commands, the average person will clear the terminal screen after use, so as not to cause unnecessary trouble, but in many cases, and Did not completely clear the terminal screen, the following small series will introduce you to Linux to completely clear the terminal screen.
There are many other ways to clear the screen, but basically it is a variant of the clear command, and can't really clear the screen.
Coincidentally, I recently found a command that can completely solve our problems.
printf “\\033c” is the order we need. It is really emptying the terminal screen, its function is similar to the CLS effect provided by CMD.EXE in DOS.
But what exactly does this command do? What is the working principle of it?
\\033 == \\x1B == 27 == ESC
So, this command becomes "ESC"c, which is expressed in VT-XXX "Full Reset (RIS) & rdquo; escape code. All the terminals we use today are VT-compatible, but if you find yourself using a very strange terminal, you probably won't be able to use this command. Printf is a built-in command in bash, and built-in commands take precedence over other executables.
We can also use another command, reset, which also clears the terminal screen, but we can still use the up and down keys to view the history commands. One disadvantage of this command is that it is a bit slow to execute, perhaps because it does not send ESC c instructions, but the compatibility of this command is obviously better than the previous one.
The reset command is very useful when your terminal is in control. Have you ever encountered an input character that does not appear at the cursor position? When you hit the Enter key, the new prompt does not appear on the new line, but appears in front of the old prompt? The reset command is to fix this problem. You can also use this command on CYGWIN.
The above is a complete description of the Linux terminal screen. Although the clear command can clear the screen, it is not complete, but can be completely cleared by using the printf “\\033c” or Reset command.
When Linux users import multiple files into the database, the discovery process is
LibreOffice itself exists in Ubuntu system, but some people like to use LibreOffice
for installing yum on RedHat yum is the shell front-end package manager, which is the software used
In Ubuntu system operation, Pacman is a package manager that can manage the official Arch library an
Linux system uses FTP method by command
Knowledge about Linux file types and extensions
Ubuntu tips for installing Visual Studio Code
Linux configuration Python environment method
How to install and configure DenyHosts tool
How to implement ioctl function in Linux system?
Linux uses the blockdev command to adjust the file read-ahead size
How to solve the problem that the VPN client connection to the Linux server is slow to slow down
Linux system NBMA and BMA exchange method introduction
Windows 10 Build 10147 Gallery leak officially launched Edge brand
PC and NB running the lowest processing of modern desktop Linux
Win7 system computer shutdown and then automatically boot how to solve
Microsoft official guide: Win8.1 preview upgrade /installation method
Graphical Win7 System Network Bridge Settings
Easily remove mosaics from playing videos
Windows10 disables the start menu to restore the start screen skills
Let Windows7 safer five notes (2)