WebMasterCampus
WEB DEVELOPER Resources

Linux clear Command

Learn Linux clear Command with example


Linux clear Command

In Linux we can use “clear” command to clear the terminal screen

clear command

>> clear

clear output

>> 

# Empty console

clear Command in Linux (Documentation)

NAME
       clear - clear the terminal screen

SYNOPSIS
       clear [-Ttype] [-V] [-x]

DESCRIPTION
       clear clears your screen if this is possible, including its scrollback buffer (if the extended “E3” capability
       is defined).  clear looks in the environment for the terminal type given by the environment variable TERM, and
       then in the terminfo database to determine how to clear the screen.

       clear  writes  to  the  standard output.  You can redirect the standard output to a file (which prevents clear
       from actually clearing the screen), and later cat the file to the screen, clearing it at that point.

OPTIONS
       -T type
            indicates the type of terminal.  Normally this option is unnecessary, because the default is  taken  from
            the  environment variable TERM.  If -T is specified, then the shell variables LINES and COLUMNS will also
            be ignored.

       -V   reports the version of ncurses which was used in this program, and exits.  The options are as follows:

       -x   do not attempt to clear the terminal's scrollback buffer using the extended “E3” capability.
Created with love and passion.