有没有办法使用 nasm 清除终端窗口中的屏幕?
通过清除屏幕,我的意思是模拟 Ctrl-L
热键。从窗口中删除所有文本。
最佳答案
在 Bash 中:
echo -ne "\033[H\033[2J"
在 C 中:
printf("\033[H\033[2J");
如何找到字符串:
$ strace -e trace=write clear >/dev/null
write(1, "\33[H\33[2J", 7) = 7
Process 7983 detached
关于linux - 使用汇编在 Linux 终端中清除屏幕?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13206629/