Skip to content

Instantly share code, notes, and snippets.

@ASHWIN990
Created August 19, 2020 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ASHWIN990/0c7223cd5b6ffcd657ff9ae008612dde to your computer and use it in GitHub Desktop.
Save ASHWIN990/0c7223cd5b6ffcd657ff9ae008612dde to your computer and use it in GitHub Desktop.
clear the screen.
#include <stdio.h>
int main(int argc, char const *argv[])
{
printf("\033[2J\033[1;1H");
}
@onek24
Copy link

onek24 commented Jun 8, 2021

Why not just use ln -s /bin/clear /bin/cls?

@ASHWIN990
Copy link
Author

Using clear you cannot see the cleared screen but using this you can scroll through the cleared screen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment