10 月 192015
 

Source: cygwin clearscreen from bash

I want to clearscreen from bash in a cygwin terminal. I have tried

cmd /c cls
echo -e "^V^L"
echo -e "\014"

None of these work – they all give a “linefeed”. Pressing CTRL+L does work – but I want to call it from a Bash script.

Any ideas?

Answer:

There is two ways:

Using shortcuts

Alt+F8 to clear screen and Ctrl-L to skip page

Using Clear alias

  1. Go to: cygwin\home\USER\.bashrc
  2. Open .bashrc file and put this alias alias clear='printf "\033c"'.
  3. restart your cygwin terminal.
  4. to clear your screen use clear command.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

CAPTCHA Image
Play CAPTCHA Audio
Reload Image