0

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.

flag

2 Answers

0

Apple+K

link|flag
Thanks but it's not I was looking for. Sorry for asking unclearly! – Eonil Feb 9 at 8:37
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 Feb 9 at 8:50
Thanks again! It might be work! – Eonil Feb 9 at 9:18
0

in terminal: history -c

link|flag

Your Answer

get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.