views:

324

answers:

2

I know 'clear' command clears current screen, but the cleared contents just scrolled up. Is there a way to clear all cleared buffer contents? I'm figuring this to prevent scrolling up on Terminal.

---(edit)---

I'm finding a way which can be used in shell script. Or program.

+1  A: 

Apple+K

Alok
Thanks but it's not I was looking for. Sorry for asking unclearly!
Eonil
If you're running inside the terminal you want to clear, try: `/usr/bin/osascript -e 'tell application "System Events" to tell process "Terminal" to keystroke "k" using command down'` (works for me).
Alok
Thanks again! It might be work!
Eonil
A: 

in terminal: history -c

phil