UNIX Tips and Tricks To Save You Time In Terminal
onextrapixel.com
onextrapixel.com
Once you get used to it, your brain just triggers this combination whenever the command is more complex than let's say `ls -al`. This means you have to change some habits like to `tail` your logs with absolute paths, so you don't need to `cd` into the folder first, etc.
[0] https://news.ycombinator.com/item?id=6360320
[1] https://news.ycombinator.com/item?id=6046682
First it's quite funny, second it shows very pragmatic yet abstract usage of unix way of life, like quickly gathering data about your code base by combining other these atoms into new abstractions (as in SICP).
As he says, it's often half-assed, but it's the right half of the ass.
I found some nice tricks there that I ended up using.
On the other hand, I found that customizing my shell, emacs, and other such things too much a bit frustrating when dealing with multiple machines. So often I have learned to live with the defaults. In other words I don't want to get used to typing "gst" for "git status" I just type "git status" because next machine I log into might not have the gst alias.
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"
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).
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
Save more time with these: http://www.bigsmoke.us/readline/shortcuts