3 ms·
>"If your terminal window is getting cluttered and you'd like to start from fresh, you can type clear. This will clear your window as if you've just reopened Te
by diggan 13y ago
>"If your terminal window is getting cluttered and you'd like to start from fresh, you can type clear. This will clear your window as if you've just reopened Terminal."
No, it won't. It only looks like it's like reopening the terminal, it won't reload your configs and stuff. Instead of writing "clear", you can do ctrl + r to achieve the same thing.
If you instead really want your terminal to be like reopened, do "reset" instead.
Regarding the history command, combining it with grep is when it becomes really useful. Example, all my latest git commands:
history | grep -i "git"
- nfg 13y ago> you can do ctrl + r to achieve the same thing. C-r will (usually?) invoke reverse-search-history (http://www.gnu.org/software/bash/manual/html_node/Commands-For-History.html http://www.gnu.org/software/bash/manual/html_node/Commands-F...) in bash (and I'm sure some other shells also).
- slowmover 13y agoAgreed, and clear won't help if you accidentally cat some binary code and put the terminal into "goofy symbols mode". In that case it's important to remember the reset command, especially if there's something vital running in that terminal and you can't just kill it. But ctrl-r in bash starts a reverse history search, which is also very useful. It doesn't clear the screen, at least not the way it's configured on my linux machines. See: http://www.talug.org/events/20030709/cmdline_history.html http://www.talug.org/events/20030709/cmdline_history.html
- clarkm 13y agoYou mean Ctrl + l?
- WizzleKake 13y agoCame here to post this. Save more time with these: http://www.bigsmoke.us/readline/shortcuts http://www.bigsmoke.us/readline/shortcuts