News for hackers. Stuff that matters.
Re:UNIX Tips and Tricks To Save You Time In Terminal by diggan on Wednesday October 09, 2013 @09:19AM (#6521035)
>"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"

Re:UNIX Tips and Tricks To Save You Time In Terminal by nfg on Wednesday October 09, 2013 @09:31AM (#6521085)
> 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-F...) in bash (and I'm sure some other shells also).

Re:UNIX Tips and Tricks To Save You Time In Terminal by diggan on Wednesday October 09, 2013 @09:33AM (#6521098)
That is absolutely true. I meant super + r.
Re:UNIX Tips and Tricks To Save You Time In Terminal by raphdg on Wednesday October 09, 2013 @09:33AM (#6521101)
I think he meant C-l .
Re:UNIX Tips and Tricks To Save You Time In Terminal by diggan on Wednesday October 09, 2013 @09:41AM (#6521144)
No, I didn't but that's pretty handy since it doesn't hide the new prompt.
Re:UNIX Tips and Tricks To Save You Time In Terminal by slowmover on Wednesday October 09, 2013 @09:57AM (#6521224)
Agreed, 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

Re:UNIX Tips and Tricks To Save You Time In Terminal by clarkm on Wednesday October 09, 2013 @12:39PM (#6522290)
You mean Ctrl + l?
Re:UNIX Tips and Tricks To Save You Time In Terminal by WizzleKake on Wednesday October 09, 2013 @01:17PM (#6522519)
Came here to post this.

Save more time with these: http://www.bigsmoke.us/readline/shortcuts