Clear terminal command

This commit is contained in:
Imbus 2024-07-10 23:47:41 +02:00
parent 16ec5d2d7b
commit ace0dc3de9
2 changed files with 12 additions and 0 deletions

View file

@ -132,6 +132,7 @@ UPROGS=\
$U/_grind\ $U/_grind\
$U/_wc\ $U/_wc\
$U/_zombie\ $U/_zombie\
$U/_clear\
fs.img: mkfs/mkfs README $(UPROGS) fs.img: mkfs/mkfs README $(UPROGS)
mkfs/mkfs fs.img README $(UPROGS) mkfs/mkfs fs.img README $(UPROGS)

11
user/clear.c Normal file
View file

@ -0,0 +1,11 @@
#include "kernel/types.h"
#include "kernel/stat.h"
#include "user/user.h"
int
main(void)
{
write(1, "\e[1;1H\e[2J", 12);
exit(0);
}