Clearing the cygwin screen. CLS not working for cygwin on your machine?
As of this writing, I am pretty new to the linux/unix environment. At some point in college I had installed Mandrake Linux on one of my computers. The most of I ever did on that was spoff text e-mails (to friends and family) and maybe use open office. But since then I had not really messed with any type of linux variant of any kind, until last Friday.
A former co-worker of mine recommended that I check out cygwin if I wanted to get comfortable with a unix enviroment. Furthermore the awk and sed functions in unix provide a good deal of commands that allow you to work with text files (without having to write utilities in C# or any scripting language).
So, I switched jobs and it is my first opportunity to give the unix environment and it's features a test drive via cygwin. Installing it was fairly straightforward. Opening it is easy with the batch file they provide.
Running basic commands is much like any linux/unix terminal, with the exception of one. The "cls" or "clear" command.
if I type that, nothing will happen. So here is what you do,
on your screen type: alias clear='cmd /c cls'
Once you type that, your cursor will go to a new line.
Now anytime you want to clear your screen, just type clear. This will clear the entire contents of the dos prompt that you are using for cygwin. If you don't want to clear the entire contents of your screen and prefer to just scroll down to the most recent line in the command prompt with empty space below it, hit [CTRL] + [L] at the same time (that's control + l).