05. clear_command - muneeb-mbytes/linux_course GitHub Wiki

clear

clear command is used to clear the current terminal screen. this command looks for a terminal type in the environment and after that, it figures out terminfo database for how to clear the screen. And this command will ignore and command-lone parameters that may be present. Also, the clear command doesn't take any argument and it is almost similar to cls command on a number of other operating systems.

Syntax:- $clear

Note:- ctrl+l option is also works same as clear command to clear the current terminal screen.


The below figure shows the blank terminal screen and it shows the clear command output.

clear

                                        Fig.1. clear command output

The below GIF shows the whole process of sourcing scripting file till the output, here if the user enter clear command means the terminal gets cleared.

latches and flipflop

                                         Gif.1. clear command

Link to GitHub lab:https://github.com/muneeb-mbytes/linux_course/blob/b7_team_kachori/clear_command/clear.csh


To learn rm command: https://github.com/muneeb-mbytes/linux_course/wiki/06.-rm_command