Cls is a internal command found inside windows command interpreter cmd, that is used for clearing the console window.
It does so by removing the entry of all previously entered commands, and their corresponding outputs. The command was first introduced in the MSDOS Version 2. Initially it was for command.com (command processor for MSDOS), which is the predecessor of cmd.exe (AKA Command Prompt).
It is one of the most used commands, and is offered by all Operating Systems in one way or another (ex. Linux has a command named clear which serves the same purpose). In this article, we would learn about this command and how to use it.
Description of the Command :
CLS : Clears the screen.
In order to obtain the above text execute the cls /? command on cmd.
Using Command :
The command serves only one purpose, and that is to clear the output screen. For doing so execute the command without any parameters.
For this example, we would be using the following console window.
This window currently contains output from the dir command. In order to clear this output (and others before it) execute the CLS command. After command execution, the windows appear as follows.
It is clear that from the above image, that all the previous output has been removed.
- pr command in Linux
- Blockchain of Things (BoT)
- The SON Algorithm and Map - Reduce
- Screen Density and Its terminologies
- Proof that NAE-4-SAT is NP Complete
- Effective ways to increase Traffic on your Website
- Bisecting K-Means Algorithm Introduction
- Flutter - Fading a Widget
- Composite Transformation in 2-D graphics
- Tutorial on Binary Search Tree
- Working with Radio buttons and Check boxes in Selenium with Python
- pr command in Linux
- Convert Image into Sketch
- Human Resource Management (HRM)
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.